In northern climates, you need light skin in order to pass enough sunlight to produce enough vitamin D. It's possible that the genes for light skin came from Neanderthals breeding with humans rather than evolving in the rather short period of a few tens of thousands of years.
The vitamin D theory is popular but some scientists disagree with it. Not all northern populations have light skin and everyone was outdoors so much then that vitamin D deficiency should not have been a major problem. Natural selection requires many people to die before breeding age to choose a preference. A vitamin D deficiency was probably not enough to kill off so many in such short a time. Mothers play an under-appreciated role in cosmetic trait selection, by playing favorites. This is hard to understand in modern times because we have food security, but they didn't have that back then and mothers often had to choose among their many children. Some proof that blond hair, light skin, and less hairy bodies was cultivated by mothers is that children are whiter, blonder, and less hairy than adults. Most European babies have blond hair and blue eyes, then these traits are free to change once the mother has bonded to the child.
I suspect that the light skin gene of Neanderthals (already named by some the “ginger”, reddish gene) is quite different from the early European homo white gene. I also suspect that the Neanderthal gene was much earlier, since they had such a long history of surviving in the cold, cold north.