Histograms are a graphical representation of the tonal range of your image and are an invaluable tool to judge and obtain the best exposure for a photograph.
If you are using a DSLR you will be able to review the histogram after you have captured your image and adjust the next accordingly, whereas with a mirrorless camera you can view the histogram live and your adjustments are reflected in a realtime change in the histogram.
Let's look at the make up of a histogram. In essence, the vertical scale denotes the number of pixels within a tonal range and this varies. The horizontal scale ranges from the darkest black(left side of the graph) through to the brightest whites (right side of the graph) . The horizontal range, therefore, transitions from black, through shadows and mid-tones, to white and then highlights. You might have seen on some histograms a scale of 0-255, which represents the tonal changes transitioning from black to white, this means that there are 256 different tonal changes and whilst some images (16 bit images) may have more tonal increments, the same scale is used.
A 'Neutral' exposure produces, arguably, the safest or most balanced exposure and even if tones are brighter or slightly darker than you would wish, there is sufficient latitude to allow for post processing, and thus an improvement in their appearance. You can see that in the example above, the histogram is evenly distributed from the centre of the image and either side of centre and generally forms a symmetrical or close to symmetrical plot. However, don't be overly concerned at trying to get the perfect histogram, you won't, as no scene is evenly distributed in terms of it's tonal range,
That being said, you do want to avoid exposing such that the histogram is all the way to the left or right. If your histogram is all bunched to the left, the image will be underexposed and if the vertical scale is at the maximum, it will indicated that areas of blacks will have been crushed, to the point where any detail in those areas may be unrecoverable or at best very difficult to recover. Using a wider aperture or a longer shutter time, can help here and this is definitely where the mirrorless camera has an advantage.
Conversely, if the histogram is bunched all the way to the right, the image will be over exposed. Again, if the vertical scale is at its maximum, the histogram indicates that are of bright whites have been clipped, or blown out. In some peoples eyes this is worse than crushing the blacks, as recovering detail in this area is nigh on impossible. Again, there is some mitigation to be employed and lowering the ISO can assist. Obviously, you can try to increase the shutter speed or use a higher ƒ number for your aperture. Which you apply will depend upon the subject and what you are trying to achieve, but again, a mirrorless camera has an advantage over older DSLR relative (this is also reflected inthe EVF of a mirrorless where its a case of what you see is what you get!)
These last two situations will be very apparent but there will often be occasions where the histogram is predominantly to the left or the right, what do you do then?
Okay, these are potentially more likely to be encountered and you have far more latitude to correct these post capture. In the case of the bias to the left, there is simply more data to play with and the histogram can be dragged to the right, with judicious editing in Adobe Lightroom /Photoshop or similar - this can be done by raising the shadow detail. Clearly, this needs to be done carefully and perhaps with a little bit of increased exposure, but care needs to be taken otherwise noise will be introduced. If we now turn to the opposite situation where the histogram is predominantly to the right, the situation is similar. Again there is more data to play with and thus editing can retrieve the image, but careful editing needs to be applied and using the highlight recovery tool along with the exposure tool are tools to consider. In all cases sympathetic use of the exposure, highlights, shadows, white and black sliders are required - use small adjustments!
It goes without saying that using RAW images over JPEG'S will give you better results and far more latitude to recover detail, but its best to try and avoid the situation in the first place. Remember that JPEGS are compressed and compressing the file some data is discarded, this cannot be recovered and thus your ability to improve a JPEG is minimal and this is an even greater issue if you have used one of the lesser JPEG types (Normal / Basic etc)
Histograms are your friend, learn to read them and understand what they are saying about your image, or the scene through your viewfinder. This article is only a brief outline of what a histogram is and what it tells you and you should also be mindful of them when it comes to editing the images later - they really are helpful and in bright sunlight, when you can't see the play back image properly - these may be your only way of really knowing how well exposed your image really is!