The laws all differ slightly from state to state but in NY there's a section in the Penal Law and Criminal Procedure Law called Article 35: Defense of Justification. It basically states when a person could use deadly physical force given the certain situations that would justify the use. If the robber had a shootout with the homeowner and tried to escape from the home and the homeowner shot him in the back and killed him then the homeowner may be charged with murder because the robber was making an attempt to flee and became less of a threat downgrading justification. That's how NY would be but the laws in other states may be similar but I don't know. But back to topic, the homeowner was justified in his actions. I think I may have rambled a bit.