When is it appropriate to use a stun gun?

A Philadelphia police officer used a stun gun last week against a teenager who ran onto the field during a Phillies game. In Minnesota, a complaint alleges that a man was shocked with a Taser after shouting at authorities in the Sherburne County jail. Today’s Question: When is it appropriate to use a stun gun?