This is a really good question. I think many of you know how important it was in all ancient cultures to provide hospitality. It was a responsibility and a duty to offer hospitality to the stranger. These actions were based on a specific protocol. Among them is that the stranger must be transformed into an ally by the offer of hospitality. This offer can only be made by the male head of the household or the male citizens of a town. It usually involved a statement about the duration of hospitality, but this could have been mutually extended. The stranger had the right to refuse, but this would obviously have been an affront to the host's honor and oftentimes would lead to serious conflict or attack. Once the guest accepted, more rules came into play: the guest could not ask for anything; the host provided the best of what he had; the guest responded with words of good news or appreciation for what the host had done; the host could not ask personal questions of the guest. The guest remained under the protection of the host until he actually left the zone of protection established by the host.
So, let's see how this all plays out in the case of Jael and Sisera (Judges 4-5). Beginning with Sisera, he left the battlefield in defeat. He was already in a state of shame and, no doubt, sought refuge in the encampment of an ally (Heber's encampment). However, he went to Jael's tent, not her husband's. In so doing, Sisera had already violated the rules of hospitality by robbing Heber of the opportunity to provide it. This would bring dishonor to Heber and additional shame to Sisera. Some think that Sisera deliberately approached Jael's tent because it would have been the one least likely to be searched. They know that even though Heber would have protected him under the tent of hospitality, Sisera's enemies could have waited for him to leave and then attacked him. But by going to Jael's tent, Sisera also dishonored her. Approaching and entering a woman's tent when she is alone would have led to possible adultery charges for both of them. This would not bode well for Jael. Once there, he started making requests. He asked for water. Then he asked Jael to be on the lookout to make sure no one accidentally stopped by while he was there. Both of these requests impugn the integrity of the host; under the rules of hospitality, the guest cannot make any demands – even polite ones – because in a deep way, it reverses the position of host and guest. His requests of Jael could have been perceived by her as threats that could very well be considered hostile made against her by a stranger. On the one hand, it makes her actions more justifiable.
On the other hand, she also violated the rules of hospitality. She had no right to offer it in the first place. She reassured Sisera that he had nothing to fear. As Heber's wife, Jael had a duty to uphold and support Heber's alliances. This would, however, be null and void if the stranger had threatened her safety. Some people might have trouble with Jael's actions. She welcomed a stranger into her tent, and then killed him. Those actions are inexcusable on so many levels. But one thing needs to be taken into account, which is simply that she might have been acting on divine impulse. The Spirit of God drove her to take this action. She was praised for this. Let's consider the alternative for a moment. Perhaps, if she had refused him hospitality, he would have been able to escape. How would that have been part of God's plan? She had to entice him; she had to make him believe he was safe. She didn't know that Barak was also on his way to her tent. And, if Barak had found him alive, Sisera might have suffered many worse indignities. He would have had to pay for the years he had been oppressing God's chosen people. His ultimate fate would have been the same. He would have been killed.
We don't know if Jael knew about Deborah's prophecy – that Sisera would be killed by the hand of a woman. But Jael surely knew about the oppression. She knew about the raging battle. She knew what was at stake. Perhaps as soon as he found his way to her door, she knew she had been chosen for this task. And she did not shirk from her opportunity. If she had hesitated, he might have also harmed her. There is no telling what he would have done. So she acted, and that is why she was blessed by the angel of the Lord.