There are a couple reasons why a dog’s eyes become cloudy.

The first one is cataracts, which is a change in the lens of the eye thought to be caused by protein molecules that become linked together. Cataracts can occur at any age and some puppies are even born with them. They can be caused by nutritional deficiencies, poisons, inflammation in the eye, and elevated blood sugar (a side effect of diabetes).

A second reason is nuclear sclerosis (also called lenticular sclerosis), which is a condition that occurs as the lens of a dog’s eye hardens and becomes more compact with age, resulting in a hazy, bluish appearance. Nuclear sclerosis does not usually interfere with a dog’s vision until it becomes quite pronounced in the late stages of life.

Your veterinarian can examine your dog’s eyes and tell you whether there is any cause for concern. 

Reference: Ask The Vet: Easy Answers To Commonly Asked Questions / by Leslie Sinclair.