David's hope in judgment was that the world would revere God for the justice that He brings when He judges the wicked. I have to admit it, without the perspective of verse eleven, the rest of Psalm 58 seems, well, vindictive. David prays for God to break the teeth of the wicked. He prays for them to burn up in fiery judgment. He wants them to melt away like slugs. It is not the most gracious of prayers!
David knows that God must judge sin. Did he ever pray these things for himself when he failed God? After all, he had affairs, murdered his lover's husband, and covered it all up using his own generals and power as commander in chief of Israel's army. Yet when it came to his own sin, he found mercy and grace by repentance. It is to the hardened, unrepentant wicked that David prays for God's justice so that others might know and fear God. But personally, I am glad Psalm 51 precedes Psalm 58. And David was probably happy with that too.
The hope in judgment is for the glory of God, even as it falls in judgment, to be appreciated in the world. A true worshiper knows that God is glorified even in judgment and respects that truth, willing to let God always be in control. The hope in judgment is that people will know God.