It has been conjectured that this psalm was written after the incident with Sennacherib, during the time of Hezekiah. Whether this is true or not, I’m not sure, but it does fit with the events laid out in Kings and Chronicles.
And here we see the psalmist praising God for defending Israel against the enemy. He sings,
God is renowned in Judah; in Israel his name is great. His tent is in Salem, his dwelling place in Zion. There he broke the flashing arrows, the shields and the swords, the weapons of war. (1-3)
He then sings about how God brought judgment on those who tried to destroy Jerusalem.
One verse is very interesting. It says,
Surely your wrath against mankind brings you praise. (10)
It seems a bit unusual to think of God’s wrath bringing him praise. But it’s happened more than once. When Sennacherib mocked God and his power to save, God brought about the praise of Israel by destroying his army.
When Pharaoh said, “Who is this Yahweh that I should listen to him?” God again caused his name to be praised and feared by his actions against Egypt in order to set the Israelites free.
So I think here there is a warning to take from this, as well as a comfort. If we place ourselves in God’s hand, he will defend and help us. But if we defy him, there will be judgment. Either way, his name will be honored. As Paul put it,
At the name of Jesus every knee should bow, in heaven and on earth and under the earth, and every tongue acknowledge that Jesus Christ is Lord, to the glory of God the Father. (Philippians 2:10-11)
The only question we need to ask is will we confess this with thanksgiving, love, and praise? Or will we confess this with anger, frustration, and bitterness?