Everything in moderation.
15 - 20 minutes a day with sunscreen on is usually enough to generate the Vitamin D the body needs.
As someone who has spent most of their life outdoors (hiking, camping, fishing, rockhounding, gold prospecting, and military service), I have quite a bit of sun-damaged skin. I have had seven skin cancers removed and now get checked every six months by a dermatologist.
I have been told to wear sunscreen while outside. Wear long sleeves and a wide-brim hat. The exposure that gets done today may not show up until 30 years from now. Protect your skin, and you can retain a youthful appearance for many years to come.
Thanks, MM, for bringing this up.