To register the module, you need to create a registration.php file with the following content:
app/code/[VendorName]/[ModuleName]/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'[VendorName]_[ModuleName]',
__DIR__
);
To register your theme in the system, in your theme directory you need to create a registration.php file with the following content:
app/design/frontend/[VendorName]/[themename]/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/[VendorName]/[themename]',
__DIR__
);