Biologists have long suspected early mammals were nocturnal, taking advantage of (most) dinosaur sleeping patterns, and only shifted to daytime activity after their fearsome competitors disappeared. Although this makes sense, it's been very hard to prove, but now a study of thousands of species provides powerful evidence for the theory. The legacy of a nocturnal past has survived in most mammals' retinas.
If you were designing an eye for nocturnal and diurnal species you would produce something very different. Since evolution doesn't start from scratch, not all animals have eyes with architecture best suited to their current lifestyle, a fact that remains one of the best pieces of evidence against claims of “intelligent design”.
Fish, reptiles, and birds that hunt in daylight have a part of the retina called a fovea that sharpens their vision in well-lit conditions by packing lots of light receptors together. Among mammals, however, only certain primates, ourselves included, have a fovea. Similarly, the color-blindness of most mammals, a result of only having two types of optical cones rather than three or even four, is a hindrance to hunting during the day, but not one large enough to stop mammals becoming the apex predators of most ecosystems.
The theory that this pattern is a result of a nocturnal past for mammalian ancestors dates back to the 1940s but has been hard to prove, since fossils seldom tell us when an animal was active. Professor Kate Jones of University College, London, may have changed this. In Nature Ecology and Evolution, Jones categorized the activity patterns of 2,415 species with representatives from 90 percent of the surviving mammalian families as nocturnal, diurnal, cathemeral (active in both day and night), crepuscular (active during twilight) and ultradian (active in cycles of a few hours). She then mapped the relationships between these species using the two most popular theories of mammals' evolutionary history.