A histogram will show you the distribution of dark and bright pixels in your image. It also indicates if you have over- or under-exposure. A histogram won’t tell you anything about the quality of an image.
On its x-axis the histogram has the dynamic range of the camera from its darkest pixels (pure black) to its brightest pixels (pure white).
On the y-axis the histogram shows the amount of the pixels for their respective brightness.
Bright pictures show histograms that lean to the right, while histograms of dark pictures lean to the left.
Over- and under-exposure is indicated by the histogram being cut off at one of the sides. In digital photography over-exposure is usually not desired.
If you set your camera’s review mode to show the histogram, you can instantly check if the image exposure was within the bounds of the camera’s dynamic range.
For more information you can also listen to TFTTF show 37 - Histogram