Many current manufacturers have websites with a search function based on the serial number of the gun. In some cases the search is as simple as punching in the serial number and reading the results.
What brand gun are you looking for ?
Springfield is really good about giving you that sort of info if you contact them and let them know the serial number.