Look at the overall body condition - a hamster should be neither fat nor skinny, with no swellings.
Hamsters should be bright and curious in attitude, and never lethargic. This can be a bit hard to judge in a nocturnal animal, but with attention (and perhaps some very gentle prodding) hamsters should wake up and be inquisitive about what is happening.
The hamster's coat should be well groomed (fluffy and smooth looking), with no bare patches. Especially check for soiling around the rear end, as this may indicate a problem with diarrhea.
The eyes, nose and ears should be clean and free from discharge. Check the fur around the eyes and nose for signs of wetness, staining or crusts.
Try to get a look at the teeth, they should not be overgrown and should be well-aligned. Also check for wet or matted fur on the chin.
Observe the hamster's breathing, which should be quiet and not labored, with no wheezing, clicking or gurgling noises.
Watch the hamster move around - it should have no signs of lameness, stiffness, or reluctance to move around.
Observe how the hamster reacts to people -- most will be skittish at first but ideally try to pick a hamster that is relatively calm about being approached and okay with being handled.