You need UV light, whether from the sun or from an artificial light source, for the body to produce Vitamin D. Unfortunately, UV light, whether from the sun or from artificial light sources, also promotes skin aging and increases your risk of skin cancer. Another way to get vitamin D is to drink fortified dairy products or take vitamin D supplements.