I think its almost an alchemical creation.
The right group is important. Good people who enjoy the tone of the game your running. (Whatever that tone may be.) Who don't make too light of serious themes, or too serious the light ones. Those that aren't so concerned with the rules and oneupmanship, but simply having a good time and enjoying the game not just for their actions but for those around them, in the group, having fun and doing well OR screwing up (in character at least.)
Games where you play no matter who is there, in some manner, and keep having fun even if its not about moving some big plot around.
I also tend to like lighter rules myself that I can judge to help people have fun on the fly, rather than locking them into some for ordained structure that might impair fun.
One thing to nod towards Paladin's post above: Part of it is being willing to go on, even when the session isn't exactly what you want. In my opinion: Stop having an agenda and just have fun.