Making your music sound as good as possible in a wide range of acoustic environments takes a little financial investment and a lot of creative listening. A good pair of studio headphones with fairly flat response is a must. Regular headphones made for consumer listening accentuate certain frequencies, so they won't give you a very accurate reflection of your music.
A good pair of nearfield monitors are another worthwhile investment. These will let you listen to your material while reducing the coloration coming from the physical space of your studio room to a minimum. (Check out our Studio Monitor Buying Guide for an informative overview of nearfield monitors.)
When mixing or mastering your songs, listen to the mixes on a wide range of sound sources—headphones, nearfield monitors, your home stereo, your car stereo, a boombox, iPod, etc. This will let you find the best overall mix for the most situations. Also, check your mix in mono as well as stereo to ensure that no elements of the mix become inaudible due to phase cancellation.