Let us reason about this problem by answering a few questions.
- Which part of the eye is most essential? The answer is obvious: the retina. If light cannot be detected, the remainder of the eye is useless.
- Can a retina, on its own, without the rest of the eye, play a useful role? Obviously, yes. Many groups of not too complex animals have ocelli, photo-receptor cells that just react to the presence of light, but cannot form images. Of course, perceiving the presence of light offers advantage against being totally blind. The proof of this: ocelli have appeared independently in at least 40 different animal groups.
- What is the next step? We also have traces among current animals. The Planaria is a Platyhelminth (flatworm) whose ocelli are located at the bottom of a concavity in its body. Thanks to this, the Planaria not only detects the presence of light, but also, to some extent, the direction it comes from. It is also obvious that being able to perceive the direction of light provides advantage to those who can, against those who cannot.