Just wear sunscreen with both UVA and UVB protection.
When I go out to the beach or pool I spend a lot of time there... HOURS! Unless you have a condition where you cannot be out under the sun, too much sun time would be anything can cause burning and peeling.
15 to 20 minutes out in the sun daily is supposed to be great vitamin d!