Where I live, all houses have electric water tank heaters. Our electricity is on the cheap side. Electric water tank heater have been used since decades without any problem. Electricity is better for our environment than any gas device if your electricity is not produce with gas, petrolium or charcoal.
Insurance companies request us to replace the tank each 10 years (to prevent flood). Most people are using a 60 gal tank, while some smaller family are using 40 gal tanks.
Tanks have either two or three electric heating elements of 4 500 W each. Elements are running alternatively, never at the same time. This means that 4 500 W is used when heating is required. It is either 0 W or 4 500 W, nothing in between.
My tankless electric water heater experience is for my water heating floor system. This system requires much more instant current than the electric water tank heater. My hydronic floor boiler draws either 0 W, 5 kW, 10 kW, 15 kW or 20 kW depending on the instant demand and water temperature. 20 000 W = 83 Amps requiring a 110 A breaker!
I am not using solar, but I would guess that if you want your water to be heated by solar, you are better go with a tank instead of a tankless system, if 4 500 W could be provided by your solar system.