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!
 
You can also obtain very cool skins in the in-game store machine and activate juicy Time Warps.
 
Save some gems if you want to use them during the competitive event or unlock the Master Key during the Iron Fortress weekly event. You have the possibility to find the Master Key in an event chest!