Will playing with a PF train motor by hand damage it?
Unless you do extreme things it should be fine.  All the gears insides the Train motors, Power Function motors and the NXT motors are made of Nylon while the pinion attached to 
the motor is made of metal.  


Image Source

Since Nylon is much stronger than ABS plastic (normal LEGO plastic), the ABS would twist, tear or brake before damaging the nylon gears.

In fact one of the activities in the NXT manual (page 34) is to manually spin the motor by attaching a wheel to it and rolling it like a paint roller.  LEGO seems to trust that it is made to survive that kind of usage.

As for the electricity generated by rolling the motor, I'm pretty sure that the NXT brick is protected for that (given that LEGO expects this kind of manipulation).  On the other hand I would not connect a sensor directly to a motor and do this.  I would assume that the trains components are also protected since it is very likely that kids would roll the train by hand.

Extra info:


Link to other LEGO trains motors opened.
Link to opened Power Function motors.
Link to opened NXT motors.