Solar Water Heater water is completely safe for our consumption, as far as the role of sun rays is concerned.
The adverse health effects of sun rays are due to ultraviolet radiation that are responsible for DNA damage, cancer and ozone destruction. The sun's rays also contain radiation in visible and infrared (IR) spectra and it is the IR (and not UV) radiation that heats the water in the solar water heaters. IR radiation is also the basis for night-vision devices, which work on the basis of heat generated by a body. Hence the solar water heater's hot water is totally safe for our consumption.
However, there has been evidence that pipes used for transfer of hot water can add harmful metals (such as cadmium) to the water. Also, if the water is not used completely, there are chances that a part of it gets heated again and again. This reheating tends to convert nitrate to nitrite, which is responsible for stomach cancer (among other harmful effects).