Why did humans who migrated farther from the equator develop lighter skin

Humans who migrated farther from the equator developed lighter skin to facilitate the production of vitamin D from sunlight. Lighter skin allows for better absorption of UVB radiation, which is necessary for the synthesis of vitamin D in the skin. As people moved away from the equator where the sun’s rays are weaker, their skin needed to lighten in order to produce enough vitamin D to meet their nutritional needs. Additionally, lighter skin also helps to prevent skin damage and skin cancer from prolonged sun exposure. This is an example of a genetic adaptation that occurred over time in response to environmental pressures.