The recent JAMA only says that Vitamin D does not help with depression. On the other hand, it seems to be useful in preventing respiratory infections, see the following for a review of randomized studies https://doi.org/10.1136/bmj.i6583 .
(Perhaps not coincidentally, placebo effects in depression are known to be large).