If a photo is over or under exposed but not to the point of clipping (histogram does not reach the left or right side) is there any reason you couldn't just fix the exposure in Photoshop or Lightroom? Obviously you wouldn't ultimately want a photo that is to bright or too dark, but is any actual information lost if the original digital file is not at the correct exposure?
Yes, you can correct a little bit; That's what the exposure sliders in Aperture/Photoshop/Lightroom are for, and it's one of the reasons RAW can be a better choice than JPEG.
However, some information is hidden by noise, and you're better off changing ISO in camera to get a proper exposure than underexposing and correcting in post. A 1/100, f/8, ISO 800 picture adjusted +2 stops in post will have more noise than a 1/100, f/8, ISO 3200 picture straight out of camera.
Also see How is ISO implemented in digital cameras? for similar discussion.
You can improve the image to a limited extent.
- Correcting overexposure: not very possible at all
- Correcting underexposure: possible, but will increase noise and possibly JPEG artifacts and banding
- Correcting overexposure: sometimes possible, usually only by less than a stop and color may be affected in some highlights
- Correcting underexposure: possible, but will increase noise (but less so than with JPEG).
Exposing incorrectly and fixing in post-processing does indeed lose information in all the above scenarios, so as a rule of thumb, aim for correct exposure. If you don't have a second chance, it's better to aim for a third of a stop underexposed than to overexpose especially when using JPEG.
Short answer, yes, you're fine if there's no information lost, i.e. there is nothing significant in the scene which is too bright or too dark even given the exposure error.
One caveat is that small areas of blown pixels don't always show up on the histogram, so be careful for that. There is also the potential noise problem for underexposure, as Evan notes.
Obviously, it's better to have a good exposure in-camera, but that doesn't always happen for various reasons. If you're still in the field and can re-expose, do that rather than planning to clean up in post. Also, don't hesitate to bracket in tricky lighting, if you anticipate this problem.
If you're shooting in RAW, "correcting" exposure is really not a problem so long as you find the result acceptable. Often despite shooting correctly, I will change the exposure in Lightroom a little to better suit the result I want, whether it's bringing the highlights back or correcting for slight underexposure.
Typically +/- 1 stop in a DSLR raw file is fine, at least in my experience. It will also depend on the ISO you shot the file at.
The other reason to correct exposure is when you are deliberately exposing to the right.
While shooting RAW: As long as the histogram doesn't clip at either end, the exposure is in principle perfectly correctible. However, in practice it is best to avoid underexposure like the plague, there be noise in dem dere shadows! Personally I "expose to the right", as long as I don't blow any channels this gives the best signal/noise ratio and can work wonders especially at higher ISO settings. It might be argued that a "to the right" exposure is actually the correct one for RAW, it gives the most signal and the least noise in the final, corrected photograph.
For JPG, the situation is different. The JPG algorithm throws out bucketloads of data when cooking the image file, this is done based on various assumptions about what will and what will not be visible to the human eye, given that the exposure is the correct one. If you start fiddling with the exposure of the image after the fact, these assumptions are rendered invalid and data that the algorithm threw away as irrelevant suddenly becomes very important for the appearance of the final image. Enter aliasing, colour shifts and other nasties. Avoid this.
Hence, for JPG, a "correct" exposure is rather important; for RAW, it is not.