VERY VERY hard to get properly straight again. I have a mongo drill press and a special device called a dial indicator that is perfect for the job and I can seldom do better than 0.003 and often no better than 0.006. You can't see that with the naked eye or the 'glass top roll' but it shows on the motor.
For the most part and by far the best results > replace. While out spin the bearings with a pencil point. Often (most often) a crash hard enough to bend a shaft dings the bearings too. They do not like impact side loading. They should be absolutely smooth.
If you're going to learn to fly them, you have to learn to fix them.
This is an old thread, but agreed, replace the shaft.
Some of the shafts are hard steel, bending them back can result in those shafts snapping off. Other issues, its very possible the shaft is bent both outside the motor and inside the motor. And, in between is the motor ball bearings on that shaft. Often those ball bearing get "Ball Dented" on the bearing races. The motor will run, but those bearings are going to fail much sooner than expected.
I've also tried to straighten motor shafts, by mounting the motor in my 12 inch Lathe, and dial indicating the motor shaft. It's a lot of work, but found that Hacker motors has those shafts for my A40-10L motor for five bucks. Not worth messing with bent shafts.
Retired and the days are just too short, busier than ever!
Im going to chime in here and agree with everyone who says to replace the shaft. If you don't get it perfect, you will shake your plane apart. I saw a bent prop shaft rip the whole nose off from a foamy a few years ago. Heads Up RC has replacement shafts that will fit a bunch of different motors.
I totally agree ... replace, replace, replace, but IF on the odd occasion, you can't get your hands on a replacement shaft, and don't want to toss the motor, a drill bit blank works like a charm HSS and straight as an arrow