Rigify rig main properties and rig layers disappeared
Open a Text Editor and see if there is rig_ui.py file there.


If there is click Run Script and check also Register. Your controls in N panel should reappear. Also make sure for future that you have Auto Run Python Scripts enabled in User Preferences under File tab (so the registered scripts are run automatically when you open blend file).
If you linked the rig into a new file, look in the original file if there is one. Both the rig and it's script need to be linked.
If there is none script to find anywhere, you need to make a new one. Create another blend file, create some rigify rig there and copy the script.

There is however a complication, each Rigify generated rig has a unique id, that matches with the script file, so the script we took will have some new random id and won't work with the original rig. Making these codes to match solves it: