Solar water heaters work by using the suns energy to heat the water and when there is not enough sun hitting the solar water heater then the water will not be able to get hot enough.
So during the night or on cloudy days the solar water heater will then use it's backup energy source such as gas or electric to heat the water and then when the sun returns it will switch back to using the suns energy to produce the hot water you need.
That's the way the solar water heater works during really cold weather too without sun.