When raising the legs/knees for training the abs, I can hang from a pull-up bar, use parallel bars with my arms straight, or rest my elbows against a rail in the captain's chair exercise. Does it matter which one I choose, or are they basically the same (regarding effort, potential for injury, muscles involved)?
Regardless of the exercises you mentioned, the targeting muscles are typically the hip flexors, rectus abdominus, and the external obliques. The position of your arms should have no effect on the work your abs receive in the exercises you mentioned if your goal is to train abs. However, the position you choose may dictate how long you can perform the movement. For example, most people that perform hanging leg raises tend to tire in the arms and/or shoulders before the abs. Hanging leg raises tend to be one of the tougher movements in terms of effort for the reason I gave. Performing the same movement on parallel bars would be akin to hanging in that, once again, the arms and/or shoulders tend to tire first. And, doing leg raises on a captain's chair would engage the arms and shoulders with even less effort.
As for potential for injury, assuming you have no prior arm/shoulder injuries, any of the movements mentioned should be ok to perform.
Deciding what exercise to use should be predicated on the movement of your legs/knees and your goals. You should aim to perform a complete range of motion without any swinging of the legs. Swinging of the legs will lessen the work the abdominals must perform as part of the exercise. As with any other body part, you should consider variety when choosing ab exercises. That would mean using all available equipment and movements to achieve your goals.