Several things can cause labored or heavy breathing in hamsters. If you use cedar bedding can cause problems with their respiratory tracts, which could be the cause of labored breathing.
I believe it would basically be the same as humans. Choking on something or a problem with heart/lungs are the basics. Only a vet could tell you for sure.
Usually when an animal has labored breathing it means that they are sick and might be in the process of dying. You can take the hamster to the vet to see if anything can be done.
Coule be a respiratory infection or some kind of tumour. The best course of action is to take your pet to an exotics vet (who specialises in rodents) for a check up.