You can use an Exif reader (like exiftool) to find out this information. For example, I check a picture of myself and I can see
Shutter speed: 1/250
F number: 8.0
Exposure program: Program AE
The program automation has aperture priority. A quick Google search (for Exposure Program Exif) provides the following values (taken from this link):
- 0 = not defined
- 1 = manual
- 2 = normal program
- 3 = aperture priority
- 4 = shutter priority
- 5 = creative program (biased towards depth of field)
- 6 = action program (set to fast shutter speed)
- 7 = portrait (for close-ups with a blurred background)
- 8 = landscape mode (for landscape photos with a sharp background)
Note, however, that you do not necessarily need the name of the mode to know what worked and what did not. What is really important is the combination of ISO (the so-called exposure triangle or better tricycle as @mattdm clearly explained), shutter speed and aperture (and exposure compensation …).
The different camera modes will only help you to set these values: but in the end, you have to say, "Look, I really would like to have more exposed for this part of the photo and less for that other part …".
You'll find that some modes are more useful in certain situations and others in other situations (for example, when you try to freeze an action, the shutter priority is much more useful than the aperture priority). But it's the final combination of values that really matter to you.