'When you're exposed to sunlight, all of the sun's energy is hitting your skin. Over the past 40 years, dermatologists have promulgated the idea that you should never be exposed to direct sunlight because it will damage your skin and cause skin cancer.
What they fail to appreciate is that when you're exposed to sunlight, many important biological processes occur in your skin. This is distinct from swallowing oral vitamin D.
While taking an oral vitamin D supplement will improve your vitamin D status, you forgo the benefits sunlight offers beyond vitamin D production.'