Peanuts are high in protein which hamsters need but also high in fat which can lead to problems with weight/obesity, and potentially liver damage etc just like in humans if fed in EXCESS. I will often remove half the peanuts from the Harry Hamster and keep them in a tub for use as training aids/treats. A couple a day is fine, a handful a day is not. One of my hamsters favourite presents is a peanut in its shell. Hours of fun and entertainment for them and us
Bear in mind there are different levels/grades of peanuts available in stores - bird peanuts should not be eaten by humans. If I wouldn't eat it myself I wont eat it to my hamsters so would not feed bird peanuts to them.