Dear Brijesh, there is no legal liability on the part of Main Contractor to ensure that sub-contractor has complied with the legal formalities as such.
It appears that your query is related more to Cenvat Credit. As per the provisions of Rule 9 it is the responsibility of the person availing credit to ensure that he is taking cenvat credit correctly. Reasonable steps are enough. Therefore, where sub-contractor is charging service tax on its bills, main contractor may ensure that he is registered with the service tax department. Though no required but he may randomly check whether he is paying service tax to the government and filing service tax returns in due course.
You may also refer a decision of CESTAT as:
Bhagwati Silk Mills Versus Commissioner of Central Excise, Surat [2011 (1) TMI 239 - CESTAT, AHMEDABA]