There are some items to which hamsters are allergic and individual hamsters may have allergies to different items.
Cedar Shavings can cause allergic reactions as well as respiratory problems in hamsters and should not be used. Pine shavings are preferable to Cedar but wood shavings from hard woods, such as Aspen, or paper based shavings are the best used.
A hamster may become allergic to certain foods and too much high energy 'heating' foods such as oats, corn and maize in the diet can cause skin irritation with the hamster scratching excessively. Bedding material, cage cleaner, dust, etc can also cause allergic reactions in some hamsters. The symptoms of an allergy can vary but may include sneezing, wheezing, skin irritation, runny eyes, fur loss. Allergy to a cage cleaner or wood shavings can result in irritated stomach and feet.
If an allergy is suspected it is necessary to establish the cause of the allergy. The first thing to consider is whether anything has changed in your hamster's routine which could be the cause of the allergy - has something new been bought for the hamster, has the food or bedding been changed, something added to the room in which the hamster is kept, etc? Wood shavings and bedding can be replaced with tissue paper to establish if the bedding material is the cause of the allergy, feeding a plain diet or dog biscuits only for a few days may establish if the hamster is suffering from a food allergy and moving the hamster to a different room may help to establish if it is something in it's environment which is the cause of the allergy.
Once the source of the allergy has been found this should be removed and the hamster should recover fairly quickly.
If the hamster shows a severe allergic reaction, or has problems breathing veterinary advice should be sought immediately.