The comedy needs to stand on its own, outside of the horror motivations.
Lesson learned from: Shaun of the Dead (2004), This Is the End (2013)
This Is the End, 2013's funniest movie so far, is piss-your-pants hilarious. Funnymen Seth Rogen, Danny McBride, Jonah Hill, Jay Baruchel, Craig Robinson, and James Franco crack endless jokes at one another's expense, clowning everything from Pineapple Express to Hill's recent Academy Award nomination for Moneyball. In one particularly uproarious scene, McBride and Franco get into an epic argument about the former jacking off to the latter's prized dirty magazines. It's amazing.
And it doesn't need the film's apocalyptic/demonic elements, which come into play later on and are admittedly badass, to sell the humor. This Is the End would've been equally as funny as it'd been titled This Is Judd Apatow's Friends Making Fun of Themselves. It's a comedy first and a horror flick second, and once the horror kicks in, co-directors Rogen and Evan Goldberg adhere to our first rule and play the monsters straight. Thus, This Is the End is the genuine article for making an effective horror-comedy.