Vitamin D is enormously important to a lot of different processes in your body. Regardless of whether it directly affects mood or not, deficiency is always bad and can certainly affect other things that affect mood.
As
@itsKismet said, I wouldn't get my hopes too high about solving your mood problems with Vitamin D alone, but it would certainly be a good place to start.
As for easy fixes, depends on the problems. :) If you are deficient in one specific biochemical, it could be easy. But biochemistry is an enormously complex; multiple things often affect each other, and have to be in just the right amounts. Also, the necessary amounts may differ, some, between different individuals. Chemical imbalances can occur due to deficiencies or failures in hormonal organs, liver or kidney problems, genetic issues, and neurological issues, including trauma.
If you have the time and inclination, there's a wealth of information on the Internet about this. You could look into Thyroid, Adrenal, and Gonadal hormone groups, B Vitamin levels, for example. As for neuro-chemical issues, I don't know that there's an easy way to test for these, but I believe there's work going-on regarding this.