1690s, "glass to regulate light rays," from Latin lens (genitive lentis) "a lentil," on analogy of the double-convex shape. See lentil. Anatomical use, of the eye part, from 1719. Lens-cap is from 1857.
In the vernacular of the photographer, anyone crowding to the front of a group, staring into the lens, or otherwise attracting attention to himself is known as a "lens louse." ["American Photography," vol. 40, 1946; the term dates from 1915]