About 100,000–70,000 years ago, some anatomically modern humans (Homo sapiens) began to migrate away from the tropics to the north where they were exposed to less intense sunlight. This was possibly in part due to the need for greater use of clothing to protect against the colder climate. Under these conditions there was less photodestruction of folate and so the evolutionary pressure working against the survival of lighter-skinned gene variants was reduced. In addition, lighter skin is able to generate more vitamin D (cholecalciferol) than darker skin, so it would have represented a health benefit in reduced sunlight if there were limited sources of vitamin D. Hence the leading hypothesis for the evolution of human skin color proposes that:

From about 1.2 million years ago to less than 100,000 years ago, archaic humans, including archaic Homo sapiens, were dark-skinned. As Homo sapiens populations began to migrate, the evolutionary constraint keeping skin dark decreased proportionally to the distance north a population migrated, resulting in a range of skin tones within northern populations. At some point, some northern populations experienced positive selection for lighter skin due to the increased production of vitamin D from sunlight and the genes for darker skin disappeared from these populations.
This allele shows signs of strong positive selection outside Africa and occurs in over 80% of European and Asian samples, compared with less than 10% in African samples. ASIP
Agouti signalling peptide (ASIP) acts as an inverse agonist, binding in place of alpha-MSH and thus inhibiting eumelanin production. Studies have found two alleles in the vicinity of ASIP are associated with skin color variation in humans. One, rs2424984, has been identified as an indicator of skin reflectance in a forensics analysis of human phenotypes across Caucasian, African-American, South Asian, East Asian, Hispanic and Native American populations and is about three times more common in non-African populations than in Africa. The other allele, 8188G (rs6058017) is significantly associated with skin color variation in African-Americans and the ancestral version occurs in only 12% of European and 28% of East Asian samples compared with 80% of West African samples. Europe
A number of genes have been positively associated with the skin pigmentation difference between European and non-European populations. Mutations in SLC24A5 and SLC45A2 are believed to account for the bulk of this variation and show very strong signs of selection. A variation in TYR has also been identified as a contributor. Research indicates the selection for the light-skin alleles of these genes in Europeans is comparatively recent, having occurred later than 20,000 years ago and perhaps as recently as 12,000 to 6,000 years ago.