Sunlight is a primary source of energy for life. However, its UV component causes DNA damage. We suggest that the strong UV component of sunlight contributed to the selective pressure for the evolution of the specialized photoreceptor cryptochrome from photolyases involved in DNA repair and propose that early metazoans avoided irradiation by descending in the oceans during the daytime. We suggest further that it is not coincidental that blue-light photoreception evolved in an aquatic environment, since only blue light can penetrate to substantial depths in water. These photoreceptors were then also critical for sensing the decreased luminescence that signals the coming of night and the time to return to the surface. The oceans and the 24-h light-dark cycle therefore provided an optimal setting for an early evolutionary relationship between blue-light photoreception and circadian rhythmicity.