A conventional heater can, at best, use 100% of the energy to heat both the water and the house.
A heat pump would use some of that energy to capture some more from a heat source (outside air, or geothermal, ground temperature). It gets less efficient as the heat source becomes cooler, so it might not be such a good idea in very cold climates. Theoretically, though, it shouldn't get lower than 100%, and efficiencies can reach 300% pretty easily.
I haven't done an extensive search on the topic, here is one of the first sources I found with the kind of graph I wanted: https://www.nordicghp.com/2017/01/heat-pump-effective-temper...
I read about 270% at -4°C (25°F). 1 watt of electricity in, 2.7 watts of heat out, not bad. The same graph reads about 480% at 18°C(65°F), and 150% at -20°C (-5°F). I know that gas heat pumps exist as well, and some systems are hybrid, so it sounds like a no brainer to me. On the flip side, they can be quite expensive, so do your calculations relative to the temperature history, and hourly electricity hours. It would be more efficient to heat when the air is warmer during the day (assuming air pump), and combine that with a well-insulated house.
Solar (thermal or electric) is pretty interesting too, I wonder what kind of efficiency one can get with photovoltaic + heat pump (photovoltaic is more versatile, being more useful during summer).