You can triplicate your offline earnings using gems when you open the game. 
 
You could also use gems to skip construction times when you want to build a new area in your prison. Just select the area that you would like to build and start the construction work. Then, the game will allow you to pay with gems to instantly have your new building. 
 
Moreover, gems can be used to buy chests (tap on the card's icon, right side icon on your playing screen) and obtain epic cards. They will bring permanent upgrades to your prisons and special characters. Read carefully their descriptions!

Save some gems if you want to use them to unlock the Master Key during the Iron Fortress weekly event. You have the possibility to find the Master Key in an event chest!