Most high-end point-and-shoot cameras and almost all digital SLR cameras are equipped to display the histogram on their LCD screen. Refer to your digital camera's manual to find out how to view the histogram of an image. Advanced image processing software, like Photoshop and Gimp, can also be used to see the histograms once you load the image onto a computer.
For a dark or under-exposed image, the histogram is usually taller at the left side of the graph. A histogram of a bright image is taller on the right side. The images below demonstrate interpretation of a histogram. Here, a sample subject is shot three times, each time with a different exposure. Along with each image is the histogram corresponding to it.

click to enlarge
The above image was under-exposed. As you can see, the graph is taller on the left, which indicates that most of the pixels are on the darker side.

click to enlarge
This image was properly exposed. You can see more pixels towards the center of the graph. The image seen below was over-exposed, which has more pixels concentrated to the right side of the graph.

click to enlarge
This way, a graphical representation of brightness helps to understand if the image is exposed properly.