Different gaming groups have different ideas on what the ideal mood for gaming should be. Some just want to play a game, where their characters play out their lives surrounded by chatter that has nothing to do with the matter at hand. Other groups take their gaming VERY seriously, never breaking character for any reason. Most groups fall somewhere in between.
Obviously, there is no right or wrong here. It's a matter of preference. Some people just want to hang around with friends, and happen to do so over a game. Others want very much to immerse themselves in the game world, leaving all of their cares behind them. But what can you, as a GM or player, do to make the mood more consistent with what you want? Simple. Establishing a game mood is not so different than setting the mood for other occasions.
First, if you don't want a moody game, don't play or run a moody game. Leave the drama and
intrigue for another day. Make up a lighthearted story. Maybe the local lord wants you to cross dangerous wilderness because there's a hermit there who makes great cherry pie. Maybe you're guards trying to keep order at a local festival. Or maybe you're just adventuring for no reason at all. Just keep it light and simple. And make sure that the ambiance is right, perhaps with some good music and a few pizzas.
If, however, you want a game filled with atmosphere, you're going to have to work a little harder, but it should still be manageable. Dim the lights if you can, or maybe light a candle or two. The internet is full of downloadable music and sound effects. Burn a cd, or else just turn up your PC speakers, and play the sounds that are appropriate. A word of caution, though, especially if you're going the computer route, although this applies to much of this article. Make sure that you test out whatever you're planning on doing before the game. For example, if you planned on having a dramatic battle take place outside during a thunderstorm, but your lame speakers make it sound like a gerbil with gas, the mood will be shattered by the mocking laughter of your players. Also, although much of the game is played in the imagination, try to adjust the decor of the room if you can to help out. If you're playing a horror-themed game, you probably shouldn't play in the Disney-themed room. Unless you splash fake blood everywhere, in which case, go for it, just don't ask me for help cleaning up.
Another thing that can be helpful to remember is props. While this was better covered by Acidburn
here, I will offer a thought or two. Remember that any prop you use should be an aid to concentration, rather than a distraction. Also, moderation is key. As much as gamers love swag, if you give them too many props, it will all turn into a bunch of junk that they have to try to keep up with, making the game tedious.
One way that you can help decide how to stage your mood involves the use of other media. Once you have determined what mood you want, find a book, or even a movie, that has the mood and atmosphere you're looking for. Either read the description or hit pause, and pay a lot of attention to what the environment is like. Think about how you could create a similar setting. The group I play with has in the past played RPGs while camping, which they have always described as an excellent experience.
One last tip for GMs. Restrict eating. Light snacking during games is fine, provided it's not too crunchy, has a noisy wrapper, etc. But eating a meal is enormously disruptive to gaming. You should take a break, which will also give players a chance to let out some chatter. Also, it gives you a good chance to get instant feedback about how the game is going. Then, after the meal, tell your players that it's time to get back to the game, give them a brief moment to adjust and get into character, and pick up where you left off. A very quick recap can be helpful at this point.
But what can you do if you're a player, not a GM? Basically, do what you should. If mood has been established, don't break it. Don't admonish other players to be serious if the game is supposed to be lighthearted. Don't start talking about the funny thing that happened at work if everyone is trying to be serious. And remember to respect the GM, and what they're working towards, and try to stay in line with their goal.
To wrap up, I thought I'd talk about what my group tends to do, which might give some inspiration to you, the reader. My group is one that tends to fall in the middle. We try to take mood seriously, but pauses in the game are frequently filled with commentary and joking. Sometimes we get carried away, to the detriment of the game. One of the things that our GM does is assign bonus experience points at the end of the game, with the amount varying by how well you played your character. Another rule that has worked very well is that to speak out of character, you have to put your hand on top of your head. While this seems strange, it eliminates the possibility of confusion as to whether or not something was said in character or not. In addition, I think it cuts down on chatter because it's a little annoying to do. And forgetting the rule can lead to dire consequences, as anything that you say without your hand on your head, your character has just said or done. The last time we played, my character suffered for my forgetfulness. Okay, so he just ended up doing a ridiculous dance, but it reminded me to get in character and stay there.
Whatever mood you're trying to create, it can be accomplished with a little effort on your part. Just remember that it's supposed to be fun. If you try to create a more immersive, moodier game, but everyone seems to have less fun, it's okay to go back to what you're used to. The only firm rule in RPGs is that you should enjoy it.