A certificate of occupancy is a very important document from a local government body that states that the building that it is on is in compliance with all related building codes. It verifies that the building is stable enough for human occupation.
This legal document will be required when a new building is constructed, when a building is being used for a dramatically different purpose than what it was intentionally designed for, or when the occupancy of the building changes for commercial or industrial buildings.
Proof can be required in certain circumstances to demonstrate that the building can and should be used as it is under current conditions. Some localities require certain fees or taxes be paid to obtain the certificate of occupancy, so this is something that should be reviewed when going through this process as well.