Even during summer in the Northern hemisphere, one would need to be out in the midday sun shirtless for a couple hours each day to get enough vitamin D that way. It’s just not feasible for most people, and doesn’t work in the winter unless you’re the Iceman.