Im sure many people have heard this before but how true is it? Now while Vitamin D has a lot of hype surrounding it (thanks to individuals such as mercola) and a lot of the data thats available, especially regarding the potential effects on testosterone, a lot of it still pretty unclear and questionable.
That said, this is the only evidence (that I know of) that shows a direct link between Vit D and testosterone levels (the other evidence out there are correlations)
Effect of vitamin D supplementation on testosterone levels in men
The male reproductive tract has been identified as a target tissue for vitamin D, and previous data suggest an association of 25-hydroxyvitamin D [25(OH)D] with testosterone levels in men. We therefore aimed to evaluate whether vitamin D supplementation influences testosterone levels in men. Healthy overweight men undergoing a weight reduction program who participated in a randomized controlled trial were analyzed for testosterone levels. The entire study included 200 nondiabetic subjects, of whom 165 participants (54 men) completed the trial. Participants received either 83 μg (3,332 IU) vitamin D daily for 1 year (n = 31) or placebo (n =2 3). Initial 25(OH)D concentrations were in the deficiency range (< 50 nmol/l) and testosterone values were at the lower end of the reference range (9.09-55.28 nmol/l for males aged 20-49 years) in both groups. Mean circulating 25(OH)D concentrations increased significantly by 53.5 nmol/l in the vitamin D group, but remained almost constant in the placebo group. Compared to baseline values, a significant increase in total testosterone levels (from 10.7 ± 3.9 nmol/l to 13.4 ± 4.7 nmol/l; p < 0.001), bioactive testosterone (from 5.21 ± 1.87 nmol/l to 6.25 ± 2.01 nmol/l; p = 0.001), and free testosterone levels (from 0.222 ± 0.080 nmol/l to 0.267 ± 0.087 nmol/l; p = 0.001) were observed in the vitamin D supplemented group. By contrast, there was no significant change in any testosterone measure in the placebo group. Our results suggest that vitamin D supplementation might increase testosterone levels. Further randomized controlled trials are warranted to confirm this hypothesis.