The factor that was determined to directly cause the loss of skin pigmentation in humans as a result of natural selection is the impact of UV radiation on folate and Vitamin D levels in human populations.
This relationship arises because reduced pigmentation allows for better synthesis of Vitamin D in environments with lower UV radiation, while higher levels of pigmentation help to protect against folate degradation in high UV radiation environments.