Tankless water heaters are more energy-efficient and provide hot water on demand, but they have a higher upfront cost. Tank water heaters are cheaper to install but may lead to standby heat loss.