Almost all digital cameras (with the notable exception of all but the newest camera phones) support a JPG comment format called Exchangable Image File Format (EXIF). When you take a photo, a lot of nice details about shutter speed and aperture are saved along with the image (and a lot of confusing and technical data, too). Unfortunately, if you take photos with a film camera and scan in the photos, the data is all missing.
Luckily, there are a number of tools made exactly for such a situation. Exifer is a good freeware option, but there’s also MaPiVi, which is open-source and cross-platform. There are a ton of them out there, if you ask the right people.