There is no easy answer to this question.
If someone comes into your home uninvited, then anything is fair game and may god have mercy on their soul.
Out in public is quite another story. The implications of using your gun outside of your home are far too complex to be addressed in a simple forum posting. You are not a law enforcement officer and it is not your job to uphold the law or to be a hero. You should only use your gun if you believe that your life or someone else's is in imminent danger unless you intervene.
The main thing to keep in mind is that once you place a bullet into another human being, your life will change forever. There are legal issues, social issues and moral issues.
The Chief of Police will not pat you on the back and thank you for taking another low life scum bag off the street. The mayor will not give you a medal of honor. John Walsh will not come to your home and interview you for a segment on AMW. It is also likely that you may be haunted by nightmares for a very long time reliving that scene where you take another person's life. Putting a bullet into another human being can be a very bloody, nasty, messy business. Please consider your options carefully.