It's so easy to blame a good or bad show on an audience. Audiences can be too drunk, too smart, too shy, too quiet, etc. The excuses can go on and on. Yes, it's true, some audience members can be real assholes but a majority of the time, an audience just wants to have fun. Unless you're an asshole also, audiences will generally be on your side.
Somethings to keep in mind:
Know your audience. Every audience is different. There isn't an 8pm audience or a 10pm audience or a matinee audience...there is just audience. Get to know them. When you're backstage, if you have the opportunity to check them out, you should. Ask the House Manager if there are any special events you should know about and most importantly, when you step out onto the stage, ENGAGE THEM. This could be as subtle or as grand as the show needs but take an opportunity to engage them so that you know where they are at. If an audience is low-energy, get them fired up! If they're high-energy, ride the wave!
Permission. Sometimes the collective mind of an audience is a shy one and they need to give each other permission to laugh out loud. Sometimes, for whatever reason, an audience as a unit, forgets that they already have this permission and are waiting on an alpha laugher to break the silence or set the volume threshold. This can be influenced by events, the weather, pre-show music, etc. or just by a coincidental collection of quiet audience members. Regardless, if they're not where you need them to be, take that moment to help them feel more comfortable. I've seen casts ask group Q&A's, count to 3 to have them yell, etc. Do what is appropriate to your show, space and audience.
Audience Intelligence. An audience doesn't like to be spoken down to or pandered. They like and deserve to be treated intelligently. In general, aim high. Don't over-explain or apologize for anything. If you need to take a moment to setup context, sure, go ahead and do that but then get right into your show and trust that your performance will be good enough and funny enough to bring the audience along for the ride. If you have to explain a game or form beyond 4-5 sentences, then you are overexplaining. Hit the main points and trust that the audience can fill in the gaps.
Cues. The audience will tell you what they want more of, when they've had enough of something...or when they just want to listen. Be aware of how your audience is responding to your performance. If they're smiling and laughing at something, give them a little bit more of what they're responding to; if they seem uninterested or in disagreement with content, find your way off that train of thought; if there is dead silence, learn how to tell the difference between bored and attentive, and respond accordingly. Personally, I've always found the silence of boredom to be filled with the white noise of shuffling butts and feet where as the silence of attentiveness is one that is quiet because the audience does not want to miss a thing. Train yourself to recognize the difference. The last thing an audience wants is to be taken out of a moment because someone thinks they're bored.
Zeitgeist. Like the cues for laughter, also be aware of what's on the minds of the public. That days' News and Events can influence the audience hive mind. For every scandal that the audience wants to ridicule, there are tragedies that they want to escape from. Our role as comedians can change from window to mirror to microscope on a show by show basis. Be aware of what might be on your audience's minds that night especially in the wake of major events.
I don't want to forgive all audience members. Hecklers and critical audience members exist who seem to get a power trip off of derailing your set. In my experience, they are the exception and have never represented the voice of the entire audience. Good house management usually removes this cancer from an audience before causing too much chaos.
In the end, we're all comedians and our goal is to make the audience laugh. Sometimes, however, I feel that we miss that connection to the audience and both sides are marching to a different drum. As much as we are allowing them into our world, they are also allowing us into theirs. Sometimes that level of trust and connection is set right from the moment the curtain goes up but other times it needs to be massaged a little. Listen to your audience and they will tell you where to find the funny.