Perhaps most importantly, the theme and mechanics have to match the level and type of humor involved. A heavy, thinky Euro is probably not going to be a great place to inject slapstick humor (but it might very well be an appropriate venue for a more subtle, "sophisticated" humor?). Similarly, a casual family game that presents itself too seriously - imagine a grimdark adventure game for kids! - is a poor fit.
When it came to Infamous, I tried to let the humor come naturally. After I made a critical decision (between v1 and v2) to enhance the narrative element of the game, writing became a more central design component. There was going to be a LOT of flavor text in this game, and the purpose of it was to bring the characters to life and give the players a sense of living inside of a comic book. Each henchman and villain needed a description, so that it was easier for the players to develop feelings of attachment for their team. And perhaps most importantly, the contracts needed significant flavor text for Success and Fail states so that your actions in the game contributed to an overall narrative. Consider how important the flavor text is in games like Eldritch Horror. If you just conduct the skill rolls without immersing yourself in the story of what's happening, you miss out on so much of what the game is offering.
So the question became: would the contracts be humorous, or would they take themselves fairly seriously? My natural inclination led me towards humorous. These were supervillains, after all - and they were engaging in periodically horrific acts within the game (kidnapping, domestic terrorism, subjugation of the entire planet, etc.). If these acts were taken too seriously, the game could fall flat or potentially be offensive. I ended up leaning more towards Despicable Me vs. Dark Knight.
Instead, contracts provided an opportunity for these villains and henchmen to fail spectacularly - in often hilarious ways. This had the added benefit of taking the edge off of contract failure. You almost want to see what happens if you fail a contract; the story is amusing, and the effects are often persistent (e.g., Injuries, Powers). Now you have a story to remember about that time your henchman was bit by genetically-modified sewer rats, or overdosed on super-fertility hormones.