Napkin math based on Amazon/Home Depot prices
You can get a 80"x90"x95% = 2kW output solar heater for $2000
or eight 45"x70"x25% = 1.8kW solar panels for $2800
A regular water heater needs about 12kWh a day, which is about what both systems would produce.
However, a heat pump water heater is 4x as efficient, so you could get by with $700 of solar panels.
Except, a heat pump water heater costs $2000 instead of $500 for a regular electric heater.
There's also install, maintenance, and the fact that we're talking about grid prices, not home panels, but those won't fit on my napkin.