You'll get the most exposure when the sun is highest in the sky, around noon. But the sun is also damaging to your skin and increases the risk of skin cancer, so I would balance it. If possible expose your legs, since they get less sun exposure to sunlight anyway for 10 or 15 minutes a day. That way you'll get sunlight to produce vitamin but won't repeatedly hit areas that already get sun exposure with more damaging rays. Another option is to take a vitamin D supplement. :-)