Dictation is a key factor but there is something else i feel. Remembering everything about music theory you've ever learned. A tough task I know but here is why I say that. Prime example ... in your head you come to this chord that just needs to be brutal/vicious/out of place/scaryish. Obviously the chord in your head isn't a "normal" chord. But what kind of chord are you looking for? Boom! Then it hits you (at least you hope it hits you or something jogs your memory)! You need a tritone chord!
I come across this problem from time to time and need a little something to stir my brain up and come up with some ideas i've probably forgotten about or maybe never even knew. I came up with this thread to hopefully help solve some of these problems:
Don't Forget About ...
I don't usually like posting other thread links in a reply but I think it goes so hand in hand with this thread that you should take a look at it ... hopefully if enough people reply with their opinions it could be a nice bit of information to be able to fall back to when you're in a tight spot.