Verse 2 seems to contradict the idea that Christians should not kill in self-defense. At first glance, this seems to support the "self-defense in one's home" argument, but like Numbers 35:16-28, the distinction is accidental versus intentional. Verse 3 explains this: "If the sun has risen on him [the killer], there shall be guilt for his bloodshed."
This statute illustrates that God differentiates between a killing committed when it is dark and one done when it is light. The meaning is not that darkness gives us license to break God's law, but rather that in the dark it is more difficult to determine what level of force is necessary to restrain an unknown intruder. The law gives the homeowner the benefit of the doubt in assuming that he would not deliberately use lethal force, since that falls under intentional or premeditated murder (Exodus 20:13).
Jesus Christ came to fulfill the law, and James also exhorts us to "fulfill the royal law" by loving our neighbors as ourselves (James 2:8). Jesus teaches that murder begins in the heart and has everything to do with intention, even if the act of killing is not followed through (Matthew 5:21-22).
This instruction reiterates that murder is either accidental or intentional, based on what is in the heart. When applied to Exodus 22:2-3, Christ's words show that when a thief is killed in the dark, there is a good chance that the homeowner acted without animosity or premeditation. But if a homeowner kills a thief when nothing in the circumstance hinders his judgment, he is without excuse—the act was intentional, and he is guilty of murder.