The good news is that dark photos have a lot more data than overexposed photos, so there is a better chance of recovering a decent photo from an underexposed one.
Bright photos blast the screen with light blocking any input with a sheer overload of information. So if you have a photograph that is too dark, you may have a chance of turning it into a decent image.
It should be said that not all shots can be saved. There is an element of luck in the process due to all the factors and variables that effect the process.
The best method to avoid underexposed photos is to alter your camera's aperture settings. Changing your shutter speed and film speed can help too. Does this sound too complicated? Well don't worry, Photoshop was created for the photographer who has better things to do.
So how do you save underexposed photos in Photoshop?
Just go to Image>Adjustments>Shadow/Highlight. The effect this has on your photo may be too much for you, but you can adjust the settings on the Amount and Tonal Width Sliders until you find just the right look.
This is a basic guide, so if you want more in-depth information on fixing underexposed photographs go to: