It is extremely valuable to donate resources to temple in order to increase your reputation. Sometimes it is even possible to revive a fallen hero here with his memory and experience left.
Temples have several uses, chief among them is resurrecting heroes with all their experience remaining.
It is also possible to donate gold or resources to raise reputation.
A fairly high reputation is necessary to declare war and send vassal offers.