How do you decide when to step in or speak out in someone's defense and when when it is right to keep silent?
This is an interesting question. You have to think about the consequences of your actions for everyone concerned. Sometimes speaking up makes things worse if you don't really have the ability to help. You also want to make sure that the person can't really defend him or her self.
In regards to family and friends, this is always really difficult for me because I am too sensitive and always afraid that someone's feelings is being hurt, when usually both parties are fine and having a healthy debate. However, if I am dealing with strangers, I never felt the need to speak up for another adult.
Back in grade school, when I witnessed other students being verbally targeted, I would usually be afraid to speak up. When I was the target, no one would speak up for me and I'd have to handle my own battles.
For me, (outside of a school situation where it's my job to prevent violence and such) the main issue is whether the person actually needs defending. For example, if my younger daughter is saying mean things to my older, I typically let my older fend for herself (they're 5 and 8) because she is the more "powerful" and is at less risk of being hurt by what her sister says. (I don't let the little one just say whatever to her sister, but I give her more leeway.) By contrast, if someone who has more "power" -- someone who is more popular in school, etc, is being mean to someone with less "power" I think it is more important to step in.