The American Academy of Dermatology (AAD) has just updated their position regarding vitamin D as related to UV light. A few brief highlights here, and then check out the entire statement at the link below.
The American Academy of Dermatology recommends that an adequate amount of vitamin D should be obtained from a healthy diet that includes foods naturally rich in vitamin D, foods/beverages fortified with vitamin D, and/or vitamin D supplements. Vitamin D should not be obtained from unprotected exposure to ultraviolet (UV) radiation.
There is no scientifically validated, safe threshold level of UV exposure from the sun that allows for maximal vitamin D synthesis without increasing skin cancer risk.
Position Statement on Vitamin D (AAD)