Heating water in your home is one of the larger expenses for energy. According to the DOE, Water heating can account for 14%–25% of the energy consumed in your home. Your normal water heater has a 40, 50 or maybe 80 gallon tank full of water that it keeps hot all the time. Then whenever you need hot water it has it available to send to your faucet. But because the water heater has to keep the water hot it spends energy constantly to do so.
An alternative to your normal tank water heater is a tankless water heater. The tankless water heater will heat water as you need it on demand. It has no tank and therefore doesn't have to spend energy keeping water warm around the clock.
From the Dept. of Energy website they say: "For homes that use 41 gallons or less of hot water daily, demand water heaters can be 24%–34% more energy efficient than conventional storage tank water heaters. They can be 8%–14% more energy efficient for homes that use a lot of hot water—around 86 gallons per day."
Tankless water heaters for a typical 2 bathroom home will run you around $650 ballpark. Home Depot has a PowerStar AE125 model for $649 and Lowes has the same AE126 for $688 That model provides 4 gallon/ minute which should suffice for most 2 bath homes.
By comparison a normal 40 or 50 gallon tank electric heater will run you around $300-400 ballpark. Lowes has a 50 gallon tank for $397. So the tankless heater costs about $300 more than an equivalent tank water heater.
The 40-50 gallon tank water heater will cost you around $400 a year to run. If you save 10-30% of that then a tankless heater would give a $40 to $120 annual savings.
If you were to spend $650 for the tank plus additional labor costs today to replace your tank water heater then the $40-120 savings may not be enough to justify that expense. However if you need to replace your tank water heater then spending an extra $300 for a tankless model would be justified.