To focus the image of a nearby object on the retina of an eye
The eye lens is an elastic muscular lens that controls the formation of an image on the retina. It is connected by ciliary muscles which control the shape of the eye lens. When the light coming from a far object the lens got stretched by ciliary muscles results in a decrease in the thickness of the lens and when light coming from nearby objects the thickness of the lens increases.