Vitamin D plays a fundamental role in the leading theory of the evolution of human skin color. The theory states that skin pigment changed in response to varying levels of UV radiation and is partially based on the observation that lighter skin tones require less ultraviolet B (UVB) radiation than darker skin tones to synthesize an equivalent amount of vitamin D.
As human populations moved away from their origins near the equator, individuals with lighter skin had higher vitamin D levels, which led to better health. Thus the lighter-skinned individuals in the population were better adapted to the context of low UV radiation availability. Driven by evolution over many generations, the average skin color of the populations exposed to less UV radiation gradually became lighter.
On the other hand, in populations that moved back toward the equator, average skin color became darker after many generations because the dark skin of our African ancestors is protective against the damaging health effects of high levels of UV radiation.