You can use an exif reader (like exiftool) to find out this information. For instance, I am checking a picture of mine and I can see
Exposure Time: 1/250
F Number: 8.0
Exposure Program: Program AE
Program AE is Aperture priority. A quick google search (for "exposure program exif") offers 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 toward depth of field)
- 6 = Action program (biased toward fast shutter speed)
- 7 = Portrait mode (for closeup photos with the background out of focus)
- 8 = Landscape mode (for landscape photos with the background in focus)
But note that to know what worked and what didn't work you don't strictly need the name of the mode. What is really important is the combination (the so called exposure triangle, or better tricycle, as @mattdm clearly explains) of ISO, shutter speed and aperture (and exposure compensation...).
The various camera mode only help you in setting these values: but in the end is up to you to say "look, I really would have liked to expose more for this part of the photo, and under expose this other part...".
What you will observe is that some mode are more helpful in some situations and other in others (e.g. if you are trying to freeze action, shutter priority is much more useful than aperture priority). But it is the final combination of values which really matters to you.