I believe presenting vitamin D supplements as effective in treating depression is kinda misleading. It's rather vitamin D deficiency that is super effective at making you miserable, but it's not the only thing that can do it to you. And since a lot of us are in fact deficient (and the threshold of being categorized as deficient may be placed too low too), it will appear as being quite effective overall, especially compared to other drugs that act on less common and poorly understood causes.