I've been playing and running role-playing games for more than sixteen years; I'm going to go out on a limb here and suggest that a majority of writers in the fantasy and science fiction genre that have started working in the last twenty years has probably a similar background, whether or not they talk about it. My belief is that it provides an excellent arena to hone storytelling skills, so long as the stories you create are not constrained by any specific rules or background. One cannot simply transplant a D&D campaign into a novel whole-cloth. Individual characters, lines of dialogue, story arcs, these are all fair game.
Where I think it proves the most useful, however, is worldbuilding. For my money, the key to any book in the fantasy or SF genre is that it must feel real. Even if it is filled with the most bizarre and fantastic things, then it needs to be internally self-consistent, which goes way beyond simply making sure to keep character and location names straight; it principally means that characters have to act in ways that are logical to the setting. The surest way to make sure that the plot fits the setting, of course, is to make the setting fit the plot; there is a certain element of give and take here.
Which brings me to a little admission; for quite some time, I've been working on my fantasy series; the intention was always two novels and a collection of novellas. With the exception of a couple of the novellas, everything was coming together nicely, but last night I ran into a somewhat unexpected problem. Over the course of five minutes all of the plots tangled together into one coherent storyline. More; it resolved basically all of the problems that I had been having with the separate stories, bits and pieces here and there. So now it appears I'm writing a fantasy trilogy.
This makes the setting more important than ever. I know that I need certain elements to make the plot work in the way I have in my head, I likewise know that I need certain locations for the trilogy; the bulk of it is set in a city-state, which means that I need a land that houses city-states, which in itself implies quite a bit about history and geography. I need enemies internal and external, I need religions that work a certain way...all of it adds up. I'm going to want a map, as well, but that actually comes a lot later in the process. (I've often fallen for the old trap of drawing a map first...what can I say, I like maps!)
Right now I have a Dark Ages-era setting, with a selection of small pocket kingdoms amid the ruins of a once-great Empire. Religions that require blood sacrifices on occasion, specifically when asking favours of the gods, small professional armies and civilian levies as well, a rising merchant class, and an enemy of all of the above. Preferably several, because the land begins in a state of war.
The hardest part here is trying not to give any spoilers. I'll outline my biggest problem and the solution; I knew that the setting begins with the King and Queen (actual titles subject to change) at war, but I needed another Queen that was not involved...and I found the answer from the Vikings. Back in those times, marriages were really just a means of formalising alliances for the most part; the Vikings took advantage of having a foot in both the Pagan and Christian camps by having two wives – one Pagan, one Christian.
Thanks, history. Consider it stolen.