Many believe that David wrote this Psalm in response to a council created by Saul which judged David to be guilty of treason in aspiring to the throne of Israel. He knew that the God he served is a God of justice, so he tells the council that they really have no authority or power.
Psalms 58:1-2 CEV Do you mighty people talk only to oppose justice? Don't you ever judge fairly? You are always planning evil, and you are brutal.
He prays and asks God to provide justice for his people and to judge the unrighteous.
Psalms 58:9-11 CEV Wipe them out quicker than a pot can be heated by setting thorns on fire. Good people will be glad when they see the wicked getting what they deserve, and they will wash their feet in their enemies' blood. Everyone will say, “It's true! Good people are rewarded. God does indeed rule the earth with justice.”
The psalmist was confident in God and his mighty power to bring divine justice upon these evil judges.
Jesus did a similar thing when he told the Pharisees that they had neglected the important things.
Matthew 23:23-24 CEV You Pharisees and teachers are show-offs, and you're in for trouble! You give God a tenth of the spices from your garden, such as mint, dill, and cumin. Yet you neglect the more important matters of the Law, such as justice, mercy, and faithfulness. These are the important things you should have done, though you should not have left the others undone either. You blind leaders! You strain out a small fly but swallow a camel.
In the end it is Jesus Christ who will judge.
2 Timothy 4:1-5 CEV When Christ Jesus comes as king, he will be the judge of everyone, whether they are living or dead. So with God and Christ as witnesses, I command you to preach God's message. Do it willingly, even if it isn't the popular thing to do. You must correct people and point out their sins. But also cheer them up, and when you instruct them, always be patient. The time is coming when people won't listen to good teaching. Instead, they will look for teachers who will please them by telling them only what they are itching to hear. They will turn from the truth and eagerly listen to senseless stories. But you must stay calm and be willing to suffer. You must work hard, telling the good news and to do your job well.
Psalms 58:11 CEV Everyone will say, “It's true! Good people are rewarded. God does indeed rule the earth with justice.”
Revelation 19:11-21 CEV I looked and saw heaven was open, and a white horse was there. Its rider was called Faithful and True, and he is always fair when he judges or goes to war. He had eyes like flames of fire, and he was wearing a lot of crowns. His name was written on him, but he was the only one who knew what the name meant. The rider wore a robe that was covered with blood, and he was known as “The Word of God.” He was followed by armies from heaven that rode on white horses and were dressed in pure white linen. From his mouth a sharp sword went out to attack the nations. He will rule them with an iron rod and will show the fierce anger of God All-Powerful by trampling the grapes in the pit where wine is made. On the part of the robe that covered his thigh was written, “KING OF KINGS AND Lord OF Lord S.” I then saw an angel standing on the sun, and he shouted to all the birds flying in the sky, “Come and join in God's great feast! You can eat the flesh of kings, rulers, leaders, horses, riders, free people, slaves, important people, and everyone else.” I also saw the beast and all kings of the earth come together. They fought against the rider on the white horse and against his army. But the beast was captured and so was the false prophet. This is the same prophet who had worked miracles for the beast, so he could fool everyone who had the mark of the beast and worshiped the idol. The beast and the false prophet were thrown alive into a lake of burning sulfur. But the rest of their army was killed by the sword that came from the mouth of the rider on the horse. Then birds stuffed themselves on the dead bodies.
Jesus, I am confident in you and your ability to bring divine justice. Help me to remember, as I watch the battles play out, that the war has already been won. Amen.