People with lighter skin tones are mostly from Europe. What evolutionary advantage did light skin offer?

a.The ability to process Niacin through the skin.
b.The ability to avoid skin cancer in cold climates.
c.The ability to process vitamin D from The sun.
d.The ability to process sodium through bathing in salt water.