Could have been a loose gas cap. That will keep the light on for about 100 miles after it is tightened up.
If not, if the light comes back on, go to a local AutoZone or equivalent and have them pull the code off the computer. It's quick and free. Or you can buy a code reader for pretty cheap if you want it for future use.
Good luck!