It depends entirely on the quality of the synthesizer (either software or hardware) you are using between the midi source and your recording software. Remember, midi is just a set of switches, not actual sounds.
A good software synth should give you good results. Almost all versions of Cakewalk / Sonar will record directly from midi to .wav. So will Winamp I believe. If you run it through a hardware synth you will likely need to record it analog through line-out/in or duplex recording from your sound card.