How did a complex structure like the human eye evolve? Charles Darwin recognized that the eye would be a real test of the theory of evolution. He suggested that it might be possible to evolve an eye from "imperfect and simple" forms:
Scientists today believe that the eye could evolve from a single light-sensing cell. Scientists disagree over whether it evolved just once, or many times.
It turns out that Nature is both creative and generous with her gifts. Recent research has shown that the tiny marine worm Platynereis dumerilii has two types of light-sensing cells. The eyes of the worm have rhabdomeric photoreceptors, a compound lens formation that is seen almost exclusively in insect eyes. Rhabdomeric photoreceptors are covered in little finger-like protrusions. In its brain, however, it has a different kind of light-sensing cells - ciliary cells that are seen in vertebrate animals. Ciliary cells have hair-like cilia that extend outward and branch out like tiny umbrellas. Two different ways of sensing light in a single organism!
Researcher Joachim Wittbrodt of the European Molecular Biology Laboratory in Heidelberg, Germany speculates that the ciliary cells may regulate the worm's daily activity cycle, saying "We think they are related to circadian rhythms. We have found that there is a direct connection to the area used for locomotion... In the beginning we had a toolbox... what was in the brain in the worm ends up in our eye." If the animal had two copies of the genes needed to make one kind of photoreceptor, speculates Wittbrodt, then the extra set would have been free to evolve into the other photoreceptor. Different animals would subsequently evolve to use the two options in different ways.
Science fiction authors do not have the constraints of being able to use only Earth DNA; they are free to imagine light-sensing cells in wildly different ways. Here is a small sample of the variety found in sf: