Not all sunlight exposure works though. It needs to have enough UV-B in it. And that’s dictated by the time of year, the location, and the time of day. In some places, you may only get an hour or so of the right kind of rays.
Latitude, local geography and weather will all play a role in how much sunlight you get. If you're living in a valley you can have much shorter days than your latitude would suggest. And if the weather is shitty enough to keep you inside much of the year that will obviously have an impact.
while we don't know "how", there is growing body of work showing a correlation between low level vitamin D - in particular winter pregnancies in Northern Europe countries correlate with higher rate of autism as well as the mentioned studies of the 2 clusters of Somali refugees.