It more or less has in mammals... though it's kind of swung the other way. Sunlight is required to produce Vitamin D, which it turns out is pretty darn important.
The catch is that most people don't get enough sunlight exposure to produce enough vitamin D.
I read somewhere that getting vitamin D is easier through sunlight than people think.
Of course it also depends on your pigmentation and where you live.