Harvard medical researchers claim that 92% of American black children and 80% of Hispanic are currently vitamin D deficient. This has little evolutionary effect, they reproduce pretty well. Vitamin D deficiency has some but not much evolutionary pressure. It is insufficient to explain the sudden appearance of white skin. Wouldn't lighter skin have been sufficient to produce vitamin D more efficiently? Pure white skin is cosmetic, and could not have been primarily driven by a minor issue like vitamin D deficiency. The vitamin D theory is neat, tidy, and politically correct, but insufficient in reality. It is not settled science by any means.
Light-colored skin (nobody but an albino is "white") did not occur suddenly. There is a continuum of skin shades from brown in Africa and southern India, through Mediterranean olive-shade, to Scandinavian lightness.
As humans expanded in a northerly direction, those who were more optimally adapted to their current climate had better health and were more likely to survive, bear children, and care for them into adulthood.