I have heard dermatologists say that no amount of sun exposure is good for the skin. However, the Vitamin D Council says that a few minutes of exposure to a large enough area of your body (legs, back) can greatly boost your Vitamin D stores with lots of health benefits. Here's an article by the Vitamin D Council about how to get the right amount of sunshine for Vitamin D, depending on your location, skin type, and other factors. As a rule of thumb, they recommend exposing your bare skin to the sun in midday for about half the time it takes for your skin to turn pink. After that, cover up your skin or go in the shade to prevent sunburn and skin cancer.
I like to eat lunch outside in the summer - and take that opportunity to expose my arms and legs to the sun for about 10-15 minutes. When I don't get out in the sun and for the rest of the year in northern Illinois, I rely on Vitamin D capsules. They are relatively inexpensive, small and easy to swallow.
One other caution: adults who are 65 years of age or older may not be able to make enough Vitamin D through skin exposure, so keep popping those supplements and ask your doctor to test your Vitamin D levels periodically.