The earliest human ancestors are believed to have come from the continent of Africa. As primates adapted and then branched off into many different species on the tree of life, the lineage that eventually became our modern day human beings appeared. Since the equator cuts directly through the continent of Africa, the countries there receive almost direct sunlight all year long. This direct sunlight, with ultraviolet rays, and the warm temperatures it brings pressured for the natural selection of dark skin color. Pigments, like melanin in the skin, protect against these harmful rays of the sun. This kept individuals with darker skin alive longer and they would reproduce and pass down the dark skinned genes to their offspring.
The main gene that controls eye color is relatively closely linked to the genes that cause skin color. It is believed that the ancient human ancestors all had dark brown or nearly black colored eyes and very dark hair (which is also controlled by linked genes to eye color and skin color). Even though brown eyes are still considered mostly dominant over all eye colors, there are several different eye colors readily seen now in the global population of human beings. So where did all of these eye colors come from?
While evidence is still being collected, most scientists agree that the natural selection for the lighter eye colors are linked to the relaxation of selection for the darker skin tones. As human ancestors began to migrate to various places around the world, the pressure for selection of dark skin color was not as intense. Particularly unnecessary to human ancestors that settled in what are now the Western European nations, selection for dark skin and dark eyes was no longer necessary for survival. These much higher latitudes afforded different seasons and no direct sunlight like near the equator on the continent of Africa. Since the selection pressure was no longer as intense, genes were more likely to mutate.
Eye color is a bit complex when talking about genetics. The color of human eyes is not dictated by a single gene like many of the other traits. It is instead considered a polygenic trait, meaning there are several different genes on various chromosomes that carry information about what eye color an individual should possess. These genes, when expressed, then blend together to make various shades of different colors. Relaxed selection for dark eye color also allowed more mutations to take hold. This created even more alleles available to combine together in the gene pool to create different eye colors.
Individuals who can trace their ancestors to Western European countries generally have a lighter skin color and lighter eye color than those from other parts of the world. Some of these individuals also have shown parts of their DNA that was very similar to those of the long extinct Neanderthal lineage. Neanderthals were thought to have lighter hair and eye colors than their Homo sapien cousins.
New eye colors could possibly continue to evolve as mutations build up over time. Also, as individuals of various shades of eye colors breed with one another, the blending of those polygenic traits may also result in the emergence of new shades of eye color. Sexual selection may also explain some of the different eye colors that have popped up over time. Mating, in humans, tends to be non-random and as a species, we are able to choose our mates based on desirable characteristics. Some individuals may find one eye color much more appealing over another and choose a mate with that color of eyes. Then, those genes are passed down to their offspring and continue to be available in the gene pool.