You gotta look at the sources - are they trying to sell you something? Or are they legit studies?
There's ONE study of only 38 people that shows *some* correlation between vitamin D deficiency and obesity. But correlation is not causation and even the study concludes that much more research and proper clinical trials are needed before anyone can say that taking more vitamin D will aid in weight loss. They also don't know if VitD deficiency is contributing to obesity or if it's the other way around and the obesity contributes to a VitD deficiency.
However, people want quick fixes, so this study has been used in a zillion websites to declare "Vitamin D aids weight loss". It appeals to people who want a quick fix or a magic bullet.
The only long term clinical study I know of that shows weight benefits to Vitamin D is one that was done on post-menopausal women and involves VitD, calcium, and tracking weight gain. The study says that adding VitD can slow weight gain in post menopausal women - not that it causes weight loss.
So again ... don't believe everything you read on the Internet. Research and think critically. If a study is referenced somewhere, find and read the WHOLE study, not just the part the marketers want you to read.