Math is the short answer. You need to figure out what you want the motor to do, i.e. how much it needs to lift, amount of torque etc. You also need to consider how it is going to be powered. If its going to run on a battery you may want to get a motor that will do the minimum work required to save battery life. If it's going to run on standard AC power from a wall outlet, this won't be as much of a concern. Your robot arm design will also change the values of the power/torque needed because of leverage. If it's going to be belt driven, direct drive etc will all figure into this too.
My suggestion for a small robot arm would be to start with a kit where the parts have been matched for compatibility and go from there. If not a kit nema 17 motors are probably enough for what you need, but they come in all different specs.
The nice thing about steppers is that they can be stopped and started at specific places in they're rotation pretty easily.
Again, unless you're really good at math and physics, a kit is the way to go as a beginner.
Just realized how old this is, whoops.