The human eye works like a camera and creates the image of an object by an inbuilt focusing mechanism, which focuses the light on the retina in the eye. The 2 parts of the eye which help in this focusing mechanism are the cornea and the lens. Any person in whom the image is not focused on the retina, needs spectacle correction to achieve a perfect retinal image. So, the human lens, cornea and spectacles work together to achieve clear vision.
Any changes in the normal structure of the human lens or cornea will need to be compensated by the spectacle correction. In diabetes, the blood sugar levels and hence the sugar levels inside the eye may fluctuate for variable periods of time. Excess sugar in the eye enters the human lens and causes it to swell up and changes its normal shape. This affects the normal focusing mechanism of the human lens resulting in blurry vision in spite of spectacle use. The vision clears up once the spectacle power is adjusted for the changes in the lens.
Even episodes of low blood sugar affect the shape of human lens and have similar consequences on the spectacles power. So, the prescription of the spectacle power changes with the status of diabetes control of the patient.