I have created custom modules in Magento 1.9.2,Now I am moving into Magento 2.1. So I need to transfer custom code from Magento 1.9.2 to Magento 2.1. Please help me.
Unfortunately, the Magento 2 migration tool (full guide available here: http://devdocs.magento.com/guides/v2.0/migration/bk-migration-guide.html) does not migrate custom modules and 3rd party extensions automatically.
You will have to manually create your custom modules and upgrade your Magento 1 3rd party extensions to their Magento 2 upgraded versions (if there's one available).
I suggest you have a look at the official code migration to help you: https://github.com/magento/code-migration