From a doctor I've heard you only need to go in the sun for about 10 minutes a day and you'll get all the vitamin D you need, but food also gives you it.
For instance, in a study on skateboarders in Hawaii who spent around 4 hours in the sun each day, 50% of participants were found deficient.