A study in the Medical Journal of Australia suggests that vitamin D deficiency may be "a significant contributor to the triumph of good over evil in fantasy literature."
The results are based on an analysis of the diet and habits of characters from Tolkien's The Hobbit.
The study notes:
The hobbit diet is clearly varied as he [Bilbo Baggins] is able to offer cake, tea, seed cake, ale, porter, red wine, raspberry jam, mince pies, cheese, pork pie, salad, cold chicken, pickles and apple tart to the dwarves who visit to engage him in the business of burglary. The dwarves also show evidence of a mixed diet and, importantly, although they "like the dark, the dark for dark business", they do spend much time above ground and have plenty of sun exposure during the initial pony ride in June that begins their trip to the Lonely Mountain.
Meanwhile, the evil characters generally avoid sunlight and eat mainly meat (and fish in Gollum's case).
The study's authors admit that their results may not apply across the fantasy spectrum.