If hamster is having problems with balance and keeps stumbling and falling over, it is suffering from a problem with its vestibular system. The vestibular system is the mechanism within the inner ear and brain that helps mammals - including us - keep balance.
A hamster suffering such a condition will tilt its head to one side and wobble as it walks. The problem will usually lie in the ear part of the vestibular system, an infection or tumor (although brain damage is sometimes the cause). Ear infections can usually be treated by a vet with a course of antibiotics. A more serious problem such as a tumor will be more difficult to treat. The first thing you must do in any case of an off-balance hamster is consult the vet for diagnosis and treatment.
A hamster who's unsteady on his feet could be suffering an ear infection
Another cause could be that your hamster is suffering from a stroke. If he sways as he walks, tilts his head a lot, or walks in circles, these are all clues that he might have recently suffered a stroke. Strokes can have minor and major effects, depending on the severity of the attack, but the effects of even quite severe strokes wear off with time, usually. Check with a vet for advice.