I'm having bad sound quality in Linux distributions. I used Ubuntu 10.10-11.04-11.10 and Ubuntu based Joli OS 1.2 and always had bad quality of sound. My question is simple. Why?
"Bad sound quality" is too broad of a question to be answerable.
What do you mean by "bad sound quality"? Is it garbled? Muted? Drops out? Crackles and pops? Plays too fast, too slow?
Regardless, most people who use Ubuntu don't have bad sound quality, so it is likely a hardware-dependent problem. The variety of sound hardware out there is huge, so it's difficult for us to ensure that every possible setup works 100%. Each new release of Ubuntu is getting better, though, so maybe try Ubuntu 12.04 if you haven't yet? Or try a different sound card (USB sound card, for example).
If you don't want to try different hardware, then fixing this problem is going to involve some debugging under the hood. Chances are at least 50% that you have some form of Intel HDA codec; a good way to start debugging that is to look here. If you don't have an Intel HDA codec then that document does not apply to you... but since you didn't give us any details...