There are a number of reasons why singing (out loud!) can be beneficial for mood:
1) the parts of the brain, as well as the facial and pharyngeal muscles, involved in singing, are similar to those most active in positive mood states. This may seem a trite or ridiculous association, but it is supported by evidence, namely that voluntary actions associated with happiness, even if unconsciously initiated, lead to more positive mood. Here's a link to the abstract of a classic, amusing, 1988 paper by Fritz Strack, published in The Journal of Personality and Social Psychology (another great journal that I recommend following), demonstrating that changing the position of facial muscles leads to a change in emotional response:
2) singing is active, yet relaxing; potentially social, yet individual; creative, yet structured
3) Fellow singers--if singing is done in a group--are likely themselves to be emotionally positive and encouraging, leading to a positive social environment.
Here's a link to an abstract demonstrating that choir singing leads to improved mood and reduced stress hormone levels:
Of note, actively singing music -- not merely listening to music -- was required to produce a beneficial effect.