What are the Health Benefits of Sunshine?

We’ve been taught to avoid the sun at all costs. Is that right?