I think anyone crazy enough to break into my home when I am there is also potentially crazy enough to kill me, but the law says that self-defense is in play if you think they have a weapon and that they will kill or greatly injure you.
California Penal Code § 198.5 sets forth that unlawful, forcible entry into one's residence by someone not a member of the household creates the presumption that the resident held a reasonable fear of imminent peril of death or great bodily injury should he or she use deadly force against the intruder. This would make the homicide justifiable under CPC § 197. CALCRIM 506 gives the instruction, "A defendant is not required to retreat. He or she is entitled to stand his or her ground and defend himself or herself and, if reasonably necessary, to pursue an assailant until the danger has passed. This is so even if safety could have been achieved by retreating." However, it also states that "People v. Ceballos specifically held that burglaries which 'do not reasonably create a fear of great bodily harm' are not sufficient 'cause for exaction of human life.'" - yahoo
If the intruder is running away and you grab the person and drag him back into your home and then kill him, and someone saw you do it, that's no good. You'd probably go to prison for that.
Know the self-defense laws in your state. Some cases may surprise you. It was deemed legitimate self defense in one case for a person to shoot an attacker who was choking him into unconsciousness.
Although some states require that you retreat before responding to force with force, California self-defense law does not.21 In fact, even if you think you may face a deadly attack by, for example, going somewhere you know an enemy frequently hangs out...and are subsequently compelled to act in self-defense...you are still permitted to go to that location.22
However, you are not permitted to seek a fight with the intent to create a real or illusory necessity to act in self-defense.23
Penal Code 211 robbery is defined as the taking of another's property from his/her possession or immediate presence accomplished by force or fear.29 As a "forcible and atrocious crime," it will be presumed that you acted reasonably if you defended yourself while you were being robbed.
Using deadly force in self-defense will be excused if a gun or other weapon was used during the commission of the robbery.
Just make sure you really think your home intruder has a gun or other weapon before you take them out. Pretty much anything can be a weapon.