“To suppose that the eye with all its inimitable contrivances for adjusting the focus to different distances, for admitting different amounts of light, and for the correction of spherical and chromatic aberration, could have been formed by natural selection, seems, I freely confess, absurd in the highest degree.”
It's not hard to see why this famous quote from Darwin's “The Origin of Species” is a favorite among creationists, particularly when taken out of context. But actually, the story of the evolution of the eye is a wonderful illustration of the power of natural selection. And when told step-by-step it's not absurd at all.
Nowadays having eyes is nothing special, but it wasn't always like that. Although life has been around for billions of years, it was not until the Cambrian explosion, about half a billion years ago, that animals (that we would recognize as such) appeared. Before the Cambrian explosion, life consisted of simple cells and cell colonies, which, it's safe to assume, were blind. After, life was mostly still like that (it still is), but there were also complex animals, such as Trilobites, which were equipped with compound eyes, not unlike those of modern insects.
So what happened in between? There is no fossil evidence, but it's a good bet that the first “eye” was simply a light sensitive patch on the body of some lucky mutant (see (a) in the figure on the right). Of course, such a patch offers very little in terms of resolution and directionality, but it's a definite advantage if the competition is completely blind. It could, for example, tell an animal whether it's night or day or help it locate the ocean surface (life on land did not exist yet), to name but a few potential uses.
The next step would be to improve the directionality of the “eye”. There is already some directionality, because the body of the animal shields the patch from light coming from behind (if we take the side with the patch to be the front), but the field of view of the patch is something like 180°. This can be improved upon, simply by placing the patch in a cup (b). This way, light from all but a few directions is shielded. This means that the animal will be able to distinguish, say, a light source right in front of it, from a light source almost right in front of it.
But there is still only a single patch (let's call it a receptor from now on), which means that the eye cannot really form an image. The eye is, as it were, a single pixel camera. The solution is obvious: multiple receptors, all sensitive to light coming from a different direction. Broadly speaking, there are two ways in which this can be achieved. And evolution has discovered them both.
One way is to repeat the whole arrangement multiple times, having lots of small eyes facing different directions (c). This the insect way and eyes like this are called compound eyes. The second way is to add multiple receptors to the same cup (d). This type of eye is called a simple eye or, if a lens is added to the mix, a camera eye. Such eyes are found in humans, octopuses and spiders.
The fact that many, if not most, species have compound eyes is, in itself, a nice illustration of why the design metaphor of evolution should be taken with a grain of salt. Simple eyes are a much better design, in the sense that a good visual acuity can be achieved with a reasonably small eye. A compound eye with a similar acuity would need to be ridiculously large (see Land & Nilsson, 2002 for an explanation). But evolution doesn't plan ahead. When compound and simple eyes diverged, both were viable alternatives. Only later did the limitations of the compound design become apparent. So insects are stuck with compound eyes, because, as they say, it seemed like a good idea at the time. Or, as Nilsson (1989) put it, in a quote which is the very opposite of Darwin's:
“It is only a small exaggeration to say that evolution seems to be fighting a desperate battle to improve a basically disastrous design.”
We have not considered a crucial aspect of most eyes, namely the lens. But still, you can see that in a limited number of simple, incremental steps, a fully functional eye can arise from nothing more than a light sensitive patch. A pessimistic estimate of the time required? About half a million years (Nillson & Pelger, 1994).
Land, M. F., & Nilsson, D. E. (2002). Animal eyes. Oxford University Press, USA.
Nilsson, D. E. (1989). Optics and evolution of the compound eye. In: Facets of vision (eds. Stavenga, D.G., and Hardie, R.C.), pp. 30-73. Springer: Berlin.
Nilsson, D. E., & Pelger, S. (1994). A pessimistic estimate of the time required for an eye to evolve. Proceedings: Biological Sciences, 256, 53–58.