A vast majority of people around the world have dark brown to black eyes. It is the primitive condition for humans, who evolved in Africa 150,00-200,000 years ago. Blue eyes therefore is a derived trait, and it is the result of a lack of the pigment eumelanin inside the eyes. Eumelanin is dark brown to black, and it is what gives skin, hair and eyes their dark color. there is no blue pigment When there is no pigment inside the eye, the eyes look blue because molecules inside the eye scatter blue light, in much the same way that the sky looks blue because air molecules scatter blue light. Blue eyes may have evolved because it allows a person who is fully clothed to absorb more sunlight to manufacture vitamin D. People living in tropical regions typically did not wear clothes until recently, when it became indecent not to wear them because of the spread of European Christian and Islamic cultures.
The reason we need to absorb sunlight to manufacture vitamin D is because it helps us absorb calcium from the food we eat. Vitamin D or calcium shortage can result in the painful, often deadly disease of rickets. When Africans first migrated to Europe about 40,000 years ago, after staying in Central America for about 20,000 years, the climate was cold, so they need to wear animal skins or clothes to stay warm. The clothing blocked sunlight so rickets must have been a very common diesease until some people evolved light skin to absorb more sunlight. The pigmentless blue eyes can also help absorb sunlight so that there is less risk of rickets. The flip side is that blue eyed folks have a higher incidence of eye cancer. That may be why blue eyes have not become universal among Europeans.
Blue eyes is the result of a mutation that disables the OCA2 gene. This gene is needed to manufacture eumelanin. To have blue eyes, a person must inherit 2 bad copies of the OCA2 gene, one from each parent, because even one good copy of this gene would allow the body to make eumelanin and the eyes would be dark, not blue. Some big cats have cubs that have blue eyes when they were born, so as to maximize production of vitamin D and absorption of calcium during the growing years Their eyes turn darker when they no longer need the extra vitamin D.