Your water heater is designed to keep heating and reheating the water in its tank, whether or not anyone is there to actually take a steamy bath. So if you want to be super attentive about wasting resources, it's a good idea to turn off power and water to your water heater before you leave for a long vacation.
But beware, problems can arise when you return home to turn your household systems back on. This Old House has a great feature about disasters that could happen to your house while you're on vacation, leaving us with this gem about re-connecting your water heater:
Many homeowners who are extra vigilant turn off the water and the power to their water heater before they leave, to avoid any risks of floods or fires. But that can spell disaster if you turn things back on in the wrong order; the tank needs to fill with water before you switch on the heater.
If you turn on power to your water heater before it's filled up with water, there's a good chance you'll burn out the element in your water heater, at best. They're not terribly expensive to replace—only $10 or so—but you'll have to wait to take that post-vacay shower. Some cases could do even more damage, so be mindful of how and when you power up your post-vacation home.