Its never a bad idea to buy a used handgun! But you do need to check a few things in case. My opinion only and hopefully others here have more ideas!
Revolvers;
1, check the timing (cylinder to cocking)
2. Stress cone/spacing
3. inner barrel and cylinder pitting
4. hammer spring (remove the grips)
5. general finish although you can always have it refinished.
Autos
1. Slide and slide lock
2. trigger and hammer cocking/action
3. barrel pitting
4. perform and field strip to ensure all part work well and re-assemble.
Last but not to be overlooked. If you have a buddy in law enforcement have him QUIETLY RUN the serial numbers to ensure it is not stolen or been used in a crime
. You REALLY have to be careful with that one! Also be aware of the State Gun Laws and the sales of weapons! Some states you HAVE TO GO THROUGH A GUN DEALER!!! But?????? Don't put yourself in jeopardy.
There are many books discussing this and also you can ask to let a gun smith see it. I always insist on shooting it first.
Anyway, basic stuff hopefully more will provide additional information but this is my check list.