One version of the joke is, what's the best way to get $1,000,000 and a Porche by writing game books?
Start with $2,000,000 and a Ferrari.
It's not exactly a high-profit business. But it can pay, mostly as a hobby.
ZakS makes a great case for just doing it yourself.
My usual employer, SJG, pays pretty well even for new authors, especially if you write for Pyramid (currently $0.04/word) or e23 (currently 25% royalties).
But what is the trick? Like with most things, the general feeling is you only need a kick-ass idea and a creative writing style and some total gaming awesomeness.
The truth is you need an idea. But execution is what gets that idea published by you or by anyone else.
Here are the three keys to being a successful freelancer, in my experience.
Most important thing: Meet your deadlines. Seriously, if you want to know why I keep getting paid writing gigs, it's because I meet my deadlines. If there is even a possibility of missing one by a single minute, as soon as I know I will contact my editor(s) and explain the situation and see what we can do. To date I've always made my original deadline or a revised deadline based on shifting company production schedules. Don't be late to work. It's your hobby but it's your publisher's livelihood.
My advice is to ask for a deadline you know you can meet, and then add 1-2 weeks to that just in case. Hand it in early if you want (I just handed something in a few days early myself). But don't be late.
Second: Write what you agreed to write. It's a contract and it's work. Treat it like that - if you agreed to do A, B, and C it's going to mess folks up when you say B didn't turn out to be so fun to write so you wrote A, C, and X instead. Not to say you can't change the approach during writing, but you can't do it without getting agreement from your publisher.
This is where your clever idea comes in. You'll need an idea with some meat on its bones to reach a reasonable pagecount. You'd be surprised how often a great idea that seems like a 32-page book turns out to be a 4-page pamphlet. So aim high. Better to reach for a big-but-doable project and have to cut chunks off to save for later than to come up short. I wrote 15 monsters for DFM1, and I have a file with 5 more that didn't make the cut. That's a lot better than 10 monsters and, uhm, about those other 5, Mr. Editor . . .
Third: Know the Rules. The game rules and the publishing rules. Know the formats. Learn the writing style of your publisher. If you're doing it yourself, have a writing style of your own and know the formats of your publishing software. If you write for GURPS and they have a standard set of formats (they do), know GURPS and know the formats. If you write for a white-box D&D clone you better know the white-box D&D rules and how you want the product to look. Know the SRD if you're writing stuff using bits of it. Understand copyright and crediting people, and know that "I didn't charge for it" doesn't mean it's not a copyright violation.
My ability to do those is probably the most important reason I get to write what I write. People at SJG know that I'll fulfill the contract, the material will fit the rules, I'm fairly well conversant with the formats, and it'll be in on time. I'm not a risk. Don't be a risk, be a known asset!
Finally, accept that this isn't going to get you glamor, fame, and fortune. You can be a big fish in the small pond of RPGs, sure, but if it's not fun, don't do it. It's not a sure-fire path to riches. You get to know that your house rules are now an influence on other people's play styles. But you also get to know that gee, not that many people buy RPGs. And you get that "friend" who shows up with a pirated copy of your book to game with and says "I got this off a torrent site!" without a trace of shame. And people who tell you that your book sucks and they'd have done it a different way. But I won't lie to you, it's fun and if you like to write, converting your game stuff into published stuff is enjoyable. It's just real work, and not very well paying work. Know that and be realistic in your expectations.
I hope that helps somebody.