1 - Unarmed guy facing an armed one will do 1 of 3 things: be compliant and do what you tell him to, run off, or charge. If the latter, fire away - it's a good bet he means you harm. Either way, best to know what you're pointing at, even if it means pretending to be asleep for a few extra seconds to observe.
2 - Be a good witness unless you personally are in danger of being harmed - should the robber decide to eliminate witnesses, protect yourself and others.
3 - Phone, 911, detailed description. There is nothing you can do from afar aside from that. You (presumably) are not a cop, the man with the gun very well might be and might not take too kindly to an armed stranger running up on a bust that he had under control 30 seconds beforehand
Oh and I forgot, my one scenario was if a guy had a gun pointed at his wife or whomever and clearly was enraged and stated he was going to kill her. If something like that were to happen and someone was killed, I would feel awful if I thought there was a chance I could have stopped it in any way.
Never, ever, ever, ever, ever get in the middle of a wife/husband fight, unless one of them is actually dead at the others' hands - even then, call 911. Been on the receiving end of many scratches from what appeared to be "damsels in distress" - trust me, the minute you go after their guy they will forget all about the threats to kill them and you will either be facing 2 opponents or 2 witnesses, not good either way.
A firearm is a last resort, not a overall problem solver - is it pax's sig that has a saying about giving a small boy a hammer? I don't mean that to be insulting, but every problem is not