The highest quality photographs are captured using the highest quality lenses.
For the compact camera owner, there are few option here. The camera and the lens are one, so the best advise is to purchase a higher end compact which will typically offer the higher image quality when compare to a more economical model.
For the DSLR owner the ability to pick and choose between all of the available lenses allows the consumer to get the truly best glass for the job at hand.
This is not the place to try and save money! You normally get what you pay for as far as image quality goes. You also pay for how fast (lower f/stop-better in low light) the lens is.
A professional grade, fixed focal range, wide aperture lens can be very expensive, but it may offer the absolute best image quality that your camera is able to produce.
The zoom lenses have come a long way as far as image quality goes, but all are a bit of a compromise.
A problem that seems common in zoom lenses with a large range in zoom, 18 to 250mm for example, is chromatic aberrations and fringing. These are color artifacts caused by the different colors in the white light spectrum not all ending up on the correct portion of the photo sensor.
While these may be of little concern to the average "snap shooter" they do affect the quality of the image. This is also very true in most "super zoom" compact camera models.
So the best advise is this. If you own a DSLR and want a zoom range from wide angle to longer telephoto, used two or three "short" zoom lenses that will cover the focal range that you are in need of. You may or may not need the low or fixed apetrure models that typically have a high price tag, but remembrer that high quality, both in build and image quality is not cheap!