People that use it tend to spend more time in the sun than those that don't. Also, vitamin D is more effective through ingestion as opposed to sun exposure anyway.
Sunbathers who use sunscreen tend to not have lower vitamin D levels than non-sunbathers who don't use sunscreen, because, well, people who don't use sunscreen don't get sun exposure anyhow.
Also, when the human genome was evolving, sun exposure accounted for 90%+ of all vitamin D intake, diet accounted for less than 10%. We know this by looking at the diets and vitamin D levels of hunter gatherers.
When I apply sunblock to me or my daughter, it's because we're going to be outside for well over 20 minutes. For that length of time, depending on conditions, I probably wouldn't even bother.
My point stands, if you apply sunblock intending to spend 1+ hour(s) in the sun, then you'll likely benefit from the vitamin D exposure.
The reason is that 7-dehydrocholesterol is photolyzed by UV light in the 280-320nm range (mostly UVB) to previtamin D. Sunblock works to absorb UVB (and usually UVA) to prevent it from penetrating your skin. Thus sunblock limits the amount of UVB penetrating your skin, and limits your ability to make vitamin D.
That being said, yes, you will still make some vitamin D with sunblock on because sunblock is not perfect at absorbing UVB. Just not as much as you would without.
So, yes, sunscreen might block some vitamin D production for some people, or might not do it at all.
Its perhaps prudent to apply it to some skin parts that are most affected by sunlight (face, shoulders) and leave other body parts without it. There you have benefits of both worlds.
Furthermore, vitamin D is not the only substance produced by the skin via sunlight (although we don't know much about other ones), so vitamin D from diet is not a substitute for it. Furthermore, vitamin D from diet can easily cause calcification depending on other factors (vitamin K and A in the diet and genetics) while there is internal protection for body made one.
This also doesn't account for skin variances. We're extremely fair-skinned and burn easily. There is no way, even through clothing coverage, I would risk the possible burns that I've seen other children have.
It's the first time I heard that.
If you apply and then spend a lot of time in the sun, your vitamin production will be decreased, but not entirely. People who routinely apply sunblock spend more time in the sun, so they will end-up producing more than those who spend no time in the sun at all.
It's the cost of weighing burns against vitamin D production. The skin cancer worry (legitimate) due to sun damage vs. decreased vitamin D production is probably a good bet to make.
Sunscreen is for one thing - so you can spend more time in the sun. If you'd burn after 15 minutes, then SPF 20 means you can spend about 5 hours with sunscreen. No SPF will entirely eliminate the sun - that'd be SPF infinity, right? SPF is a ratio.
Leaving sun screen aside (as that seems to only prolong the time you need to stay in the sun for an effect, good or negative). I suspect the number of minutes you should stay in the sun per day is > 0. But how high is it?
Recent studies have shown that people really should be supplementing 1000-2000 IU, that it has a safe upper limit of ~10,000 IU. The RDI is currently like ~500IU.
Moreover, tanning is due to an immune response. I can't speak to whether that in itself could have positive effects of the immune system, I would like to know more.
While the cons may very well outweigh the pro (ie cancer & skin damage) not sure why the other isn't discussed in context of moderation.