I was driving on a sunny afternoon when I starting wondering about this.
My feeling is that glass may filter out key components of sunlight that would otherwise make it optimal for vitamin D production among other physiological effects. Perhaps this filtering might even make the rays harmful.
It's the UV light in sunlight that causes Vitamin D production. So, since glass filters (most) UV, then it hampers Vitamin D production. I can't imagine that subtracting UV from sunlight would make the rays harmful, when in fact it's the UV that causes sunburn and skin damage upon extended exposure in the first place. It's a little more complicated because of UVA vs. UVB, but that's a general overview.
I believe some glass blocks all UV, and some blocks only UVB. I don't know which is more common, but I consider the UVB-only blocking glass to be dangerous. It seems like a good bet that UVA and UVB work together within the skin, so only exposing yourself to one or the other sounds like a bad idea to me.