Onboard audio has come a long way, though I think I would put the turning point where I considered it to be "good enough" for most purposes a couple of years after juzz86 did, and there were still sporadic crummy implementations after that, even from some of the big name motherboard makers (I'm looking at you, MSI).
Designing high quality analog electronics to operate in the harsh (EMI-wise), cost constrained environment of a consumer motherboard is a daunting engineering challenge. Most contemporary motherboards do an amazingly good job with the analog audio, all things considered; IMO it is no surprise that it took a while for the motherboard makers to figure it out. Discrete will always have superior analog specs, since a discrete card gives the designer the freedom to use dedicated DACs, high-quality op-amps, additional PCB layers, full metal shielding for sensitive circuits, dedicated power planes and voltage regulators, etc...
These days I tend to resort to discrete audio only if I'm doing something that requires high-quality analog line in (e.g. vinyl rips). I've got an M-Audio Revo and a Turtle Beach Santa Cruz for those occasions, but haven't bothered to install either of them in my current build yet.
Couple of tips for headphone users:
1. Crappy (unshielded) front panel case wiring is a common cause of noisy headphone audio. You can test this by plugging the headphones into the rear line out jack instead, and seeing if the noise persists. If plugging the headphones into the rear jack cures the noise issue, you either need to replace the front panel wiring, or use the rear jack for the headphones.
2. If you have a Realtek-equipped motherboard and don't have a discrete headphone amp, make sure headphone mode is enabled for the jack you've plugged the headphones into. Current (HD) Realtek codecs have a built-in headphone amp, but this is disabled if the jack is configured to operate as a line out; and unless you've got efficient headphones, line level isn't enough to give you sufficient volume. For Windows users, this setting should be in your Realtek audio control panel somewhere. For Linux users, you'll probably need to download the "HDA Analyzer" tool from the ALSA web site and poke around until you find the correct setting (look for a node with "Headphone Drive" listed under "PIN Caps", and make sure the "HP" box under "Widget Control" is checked).
3. (Linux users only) If you are using the rear line out jacks and are experiencing occasional skips or dropouts with your Realtek onboard, make sure the "Auto-Mute" feature is disabled. This can be done via the alsamixer tool, which should be installed by default. The Realtek Linux driver apparently has a bug which can cause it to occasionally decide you've plugged headphones into the front panel jack when you haven't, causing it to briefly (for just a fraction of a second) mute the rear outputs. Disabling the Auto-Mute feature fixes this (at the expense of not automatically muting whatever you've got plugged into the rear jacks when you plug in headphones up front).
(this space intentionally left blank)