The following checklist, inspired by Cycle Jam at the Canberra Environment Centre, is to make a used bicycle safe and rideable. It is just a minimum; it does not optimise a bike.
Frame should not have cracks. Frame should not be bent.
Handlebar should not rotate in clamp.
Handlebar clamp should not rotate relative to front wheel.
Brake levers and shifters should not rotate on the handlebar.
Both brakes should be securely attached to the frame.
Brake levers should not hit the handlebar.
Brake pads should hit the rim when the brake is pulled, not the wheel or the spokes. Brake pads should be more than 1mm thick. Brake cables should slide reasonably in their housing.
Wheels should not be so bent that either the brakes rub or the brake levers hit the handlebar and prevent braking. Spokes should not be broken or loose.
Wheels should not clunk side to side on axle. Preferably wheel bearings should not grind either.
Wheels should be seated in the dropouts properly.
Quick releases of wheels should be closed properly.
Headset should not clunk, preferably not grind either.
Bottom bracket should not clunk side to side, preferably not grind either.
Crankarms and pedals should not clunk on their attachment point, ideally pedal bearings should not grind.
Seatpost clamp securely fastened, quick release closed properly. Seat securely attached to seatpost.
Chainring bolts should be tight.
Tires pumped, not too worn or cracked. Valve stem straight (pointing to the hub).
Suspension (if any) working reasonably.
Check shifting into all gears front and rear. If problems, then:
Front derailleur should be securely attached to the frame at the correct height, not bent or angled wrong.
Front derailleur limit screws should not allow the chain to come off.
Rear derailleur securely attached to frame, not too bent.
Shifter cables should slide reasonably in their housing.
Chain should be neither too worn nor too long (sagging, too many links).