Hello,
He is probably just shy and overwhelmed by all the attention focused on him. It is quite normal.
If you notice that this continues and increases over the course of the next few years, it is worth mentioning to the pediatrician.
A two year old, no matter how advanced, is still quite immature and unable to process a lot that happens in his environment. Having a group of people singing and making a fuss over him can be a daunting experience to some kids. It may be that he was tired at the time and out of sorts. My nephew did the same thing until he was four. He never liked anything loud or anything that lended to excitement. He would cry to go to the local kiddie ammusement park and then cry to leave as he didn't seem to like the excitement of the other kids and the flurry of activity. This happens as normally, the child's environmemt is safe and routine. A deviation from the routine can become frigtening to a small child.