This is a subject that gets a lot of attention in the Texas Concealed Handgun License class, but the usual disclaimers apply: IANAL, this only applies for Texas, etc.
Essentially, defense of a third party is treated the same as self defense, and must meet the same requirements in the eyes of the law.
I’ve noted before that there are several “levels” when it comes to Texas law. First is the threat of force:
“The threat of force is justified when the use of force is justified by this
chapter. For purposes of this section, a threat to cause death or
serious bodily injury by the production of a weapon or otherwise, as
long as the actor’s purpose is limited to creating an apprehension
that he will use deadly force if necessary, does not constitute the
use of deadly force.” -Texas Penal Code 9.04
Then we come into the use of force for self defense:
“a) Except as provided in
Subsection (b), a person is justified in using force against
another when and to the degree he reasonably believes the force is
immediately necessary to protect himself against the other’s use or
attempted use of unlawful force.” -Texas Penal Code 9.31
Subsection (b) outlines exemptions, such as “verbal provocation alone,” “to resist a lawful search by a peace officer,” “if the actor (you) consented to the use of force,” “if the actor (you) provoked the other’s use or attempted use of force, unless the actor discontinues the encounter and the other nonetheless continues,” etc.
Now we come to deadly force:
“(a) A person is justified in using deadly force against another:
(1) if he would be justified in using force against the
other under Section 9.31;
(2) if a reasonable person in the actor’s situation
would not have retreated; (STRICKEN SEPTEMBER 2007) and
(3) when and to the degree he reasonably believes the
deadly force is immediately necessary:
(A) to protect himself against the other’s use or
attempted use of unlawful deadly force; or
(B) to prevent the other’s imminent commission of
aggravated kidnapping, murder, sexual assault, aggravated sexual
assault, robbery, or aggravated robbery.” -Texas Penal Code 9.32
And, of course, defense of a third party:
§ 9.33. DEFENSE OF THIRD PERSON. A person is justified in
using force or deadly force against another to protect a third
person if:
(1) under the circumstances as the actor reasonably
believes them to be, the actor would be justified under Section 9.31
or 9.32 in using force or deadly force to protect himself against
the unlawful force or unlawful deadly force he reasonably believes
to be threatening the third person he seeks to protect; and
(2) the actor reasonably believes that his
intervention is immediately necessary to protect the third person.
Now, although the law is pretty clear (as laws go, anyway) there is some judgment needed by the actor, of course. In such situations, the decisions are often split-second ones, but it is important to note that Texas law does not require the other to have a weapon at all…force and/or deadly force are justified against the unlawful use of force that threatens death or serious bodily injury. Fists are very capable of serious bodily injury. Does that mean that I can shoot someone who I see fighting in an alleyway outside a bar? No. It does mean that if I witnessed someone get knocked out, and the other party still kicks, punches, or attempts to use a weapon or an improvised weapon (say, a brick) I can intervene, using the threat of force, force, or, if a reasonable person (read, jury members) would see his actions as capable of causing death or serious bodily injury.
I also noted that a couple of things were stricken from the law as of September of this year. Texas finally became a “castle doctrine” state, which means that an actor no longer has the duty to retreat from a situation (if a reasonable person would have retreated.) Essentially, anywhere the actor has a legal right to be, from his home to his car to just walking into a store, is treated as an extension of
his home, or “castle” and he may defend himself thusly. The law change in September also removed the “Civil remedies unaffected” clause, giving actors justified by law immunity from civil action. Basically, if charges are not brought, or a jury no-bills, the actor cannot be sued by the other or the other’s family.
ETA: The law is not specific about who, or in what capacity, a third party is or is working as. Therefor, the defense of a peace officer is just as justifiable as the defense of a 7-11 clerk.