I think he wrote it because he was excited.
Although I don't think that either of the boys were enjoying themselves that day, at least not as much as people think.
A lot of people interpret Dylan's laughing and shouting as a sign that he was having the best time of life.
But I think it's a coping mechanism like edgelord put it, to convince himself that he was having fun.
_________________
Falling out of airplanes and hiding out in holes
Waiting for the sunset to come, people going home
Jump out from behind them and shoot them in the head
Now everybody dancing, the dance of the dead
The dance of the dead, the dance of the dead