You should be all business at work. It is your job after all. Work parties then become hilarious because all the humor is saved for special occasions.
In my experience, there are two types of humor that should be avoided, which I learned the hard way:
* Punching down (including joking about doing harm from a position of power)
* Sarcasm/cynicism in public channels, especially when it's directed at specific people/teams.
You can certainly have too much "party" in the office. But you can also not have enough.