The best (and free) program I found is the FITS Liberator:
http://www.spacetelescope.org/projects/fits_liberator/
This is a before-and-after sample from its User Manual: The FITS Liberator offers several non-linear functions to do this. Quoting from their User Manual (which is referring to the above sample image):
I won't go into detail about the controls that the program offers, but for our everyday photographs, the key controls are:Astronomical images contain many more greyscale levels than can be viewed on a computer
monitor or printed. In the image to the left a “normal” or linear representation of the image is shown. To
the right the effect of a non-linear Stretch, a Logarithmic Stretch, is shown. By using a non-linear Stretch
it is possible to enhance some greyscale levels in the image more than others and so to make faint
details visible without saturating the brighter parts of the image.
- The Histogram, with its associated black point and white point controls.
- The Scaling control, which sets the "background" value.
- The Stretch control, which has the several formulas that can be used.