When your city is in battle, a portion of wounded troops will be sent to the Temple instead of dying. Silver or Gold will be spent for reviving the troops. 
 
The revival cost depends on the type, quantity and elvel of the troops. Higher level troops need higher cost.