In the days before vitamin D fortified milk, peoples' main source for the vitamin was the sun. Humans can create vitamin D if they get enough sunlight, but a deficiency in the nutrient results in weak bones, a condition known as rickets in children.
However, for ancient northern Europeans, long, dark winters would have made it difficult to get enough sunlight and vitamin D. Since sunbathing during sub-zero Scandinavian winters would have been a frostbite risk, natives of the north may have evolved paler skin in order to get enough vitamin D. Light skin blocks less of the ultraviolet radiation needed to make vitamin D. Therefore, lighter-skinned people may have had healthier children who carried more of their pale genes on to the next generation.
On the other hand, heavy exposure to the sun's ultraviolet light may destroy folate, a nutrient essential for healthy development of babies, wrote Penn State anthropologists in PNAS. Since humans lack a protective fur coat and clothing could result in overheating, people closer to the tropics may have needed darker skin to act as a natural sunblock.
People who eat large amounts of fish can overcome the need for vitamin D from the sun, since fish provide the nutrient. Hence, the Inuit can survive with little sun exposure in the Arctic, according to the Smithsonian Institute.