Where did the iris of the eye derive from?
The complete answer to this question Is beyond she scope of Answers.com but I can offer some insight.
The first animals to sense light were probably very simple jellyfish like animals that followed the sunlight in the sea to eat the other animals that ate the phytoplankton (tiny sea plants). These guys had simple light sensing cells that told them which direction the light came from so that could follow it (or perhaps avoid it to hide).
If a clump of light sensing cells form a slightly curved cup instead of a flat plate then the primitive nervous system can start to crudely focus and determine differences in the light forming a shape in the nervous system. This ability to sense shape has survival value for hunted and hunter!
It is a long journey but imagine the cup shape gradually evolving to a shape like a tennis ball with a small hole in one end. The organ so described acts like a a pinhole camera and an image forms on the inside of the tennis ball eye.
Lenses probably comes next (Trilobites were the first but their stone crystal compound eyes did not survive the Perminian extiction). My expertise runs low here but there is much to learn by examining of still living species that resemble or are derived from prehistoric predecessors.