Moods swings may be caused depending upon the situation you face and how you handle it depending upon the previous learning and the ability to cope up with the stress
. It is very common in certain types of personality disorders, depression
. Get yourself assessed and get treated if you are not able to handle by your own or it causes distress in you are causing distress to the known others. Take care.