If a thief be found breaking in, and be smitten so that he dieth, there shall be no bloodguiltiness for him. If the sun be risen upon him, there shall be bloodguiltiness for him (Ex. 22:1,2)
If one is allowed to kill an intruder at night but not at day, the Torah could surely just say so? Or if the question is whether the homeowner can see the intruder, then the Torah could just say that. But it does not. The language seems to be poetic. “If the sun is risen upon him” is what is given. Which, of course, prompts the question: why?
The phrase is actually found earlier in the Torah, after Jacob wrestles with the angel and is victorious. That wrestling match starts at night, in a time of great uncertainty: is Jacob going forward or going back? Does his family stay united or divided? Is he the future of the Jewish people, or does it belong to his brother Esau? What kind of a man is Jacob, when put to the test? Everything is undetermined, hazy.
In that night a “man” wrestles with Jacob, and the battle is hard-fought. But in the morning, Jacob is still standing, and the angel blesses him. All of a sudden, there is clarity: Jacob will come back into his land, with his wife and children reunified, to resume his mission as G-d’s servant, the son and inheritor of Isaac and Avraham.
What does the Torah say? “And the sun rose upon him as he passed over Peniel, and he limped upon his thigh.” (Gen. 32:32)
The Torah makes the connection for us. When an intruder invades, the homeowner must assume the worst, and react accordingly. But in the event that the homeowner gains clarity, just as the clarity came to Jacob, then he is responsible for his actions in light of his newfound knowledge.
The “sun” in this case is metaphorical, referring to light and understanding. In any conflict, we have to act based on the knowledge that we have, with whatever revelations that dawn on us.