How does a pilot determine the difference between a firm landing, and one that needs to be written up for a hard landing inspection in a Cessna 172S?
Was it uncomfortable or did it hurt?
If it hurt you, it probably hurt the plane. That 500 pound engine is hanging a foot and a half from the firewall by four bolts. It's not hard to cause some damage.
Anyway, if you think it needs to be checked, just say something to the mechanic. It's not that time consuming, and it's better to be safe than sorry.
StallSpin has already mentioned the crucial point. The firewall will be damaged if the nose gear experiences an excessive shock. It can easily be inspected for deformation by removing the upper half of the cowling (looking through the hole for the oil dipstick, even with a flashlight, is not sufficient). The main gear is very sturdy and will probably be damaged last. Anyway, I would sugest to have a close look on it and check the overall condition. Also check the position of the tire valves. They should be at a 90 degree angle to the tire. A hard landing can go together with brake application during touch down which could cause damage to the tires. Last but not least the oleo strut of the nose gear should be inspected. Find the clearance of the oleo strut under normal loads in the POH.
You should refer to the service manual for your specific airplane, but to give an idea, the Cessna 172 AND SKYHAWK SERIES 1969 THRU 1976 SERVICE MANUAL says that you should look for "buckled skin or floorboards, and loose or sheared rivets in the area of the main gear support":
18-61. REPAIR AFTER HARD LANDING. Buckled skin or floorboards, and loose or sheared rivets in the area of the main gear support will give evidence of damage to the structure from an extremely hard landing. When such evidence is present, the entire support structure must be examined, and all support forgings must be checked for cracks, using a dye penetrant and proper magnification. Bulkheads in the damaged area must be checked for alignment, and deformation of the bulkhead webs must be determined with the aid of a straightedge. Damaged support structure, buckled floorboards and skins, and damaged or questionable forgings must be replaced.