I think it all comes down to knowing the ingredients and styles. I'm by no means an expert, but I have a few suggestions if you're starting out:
1) Read up on ingredients (hops, specialty grains, base malts, yeasts) and what styles they're typically good in. If you have a good LHBS they should let you munch on some of the grain to get a feel for the flavor.
2) Look very closely at a lot of solid, proven recipes in the styles you're interested in. This is one of the easiest ways to "connect the dots" between the ingredients and a style. I recommend buying "Brewing Classic Styles" and also going to Northern Brewer's website, they list the recipe for every kit online for free.
3) Buy "Designing Great Beers," it has good information on ingredients and techniques, the histories of various styles, and lots of compiled data from award-winning homebrew recipes. If you like Belgian beer, I'd also recommend "Brew Like a Monk"
4) Brew more! With every batch you'll learn more about the ingredients and how they affect things.
5) When you're ready to write a recipe, software like Beersmith can be very helpful.
6) One tip that I've read many times is to make sure you know what every single ingredient is doing for your beer. So don't just throw in 3 or 4 specialty grains unless you have a very clear idea of what each ingredient is going to add.