The Bible does not know anything about a political environment where issues of godliness and righteousness are not considered. Since God is sovereign over all things - He is also sovereign over all political entities. So, even though our worldly wisdom counsels us never to mix politics and religion - God knows no such artificial division.
Our proverb today tells us that when the righteous triumph, there is great glory. When godly men rule a nation according to God's ways and laws - that nation will be blessed. We read in the psalms that the nation is truly blessed whose God is the Lord. Too many consider the righteous ruling to be an oppressive thing. Yet we see that it is not godly men who oppress but sinful ones. Sin brings bondage and injustice to a society - whereas godliness brings justice and truth to bear on all that happens there. Solomon gave a godly judgment when two women were fighting over whether a child was their child or not. But in the end, it was not pure justice that let Solomon know the truth - it was which woman was willing to show mercy. Godly rulers will know both how to administer justice and how to show great mercy.
But when the wicked rise in power - men hide themselves. Consider the history of the despots who have ruled over the affairs of men. Godless men make the populace fear for their lives. They are terrified of a man who knows nothing except his own immediate self-interest. They cringe when his mode of justice knows little beyond swift and terrifying judgment. Very seldom is there mercy manifest. Consider Daniel and his judgment for praying to God rather than to the king. For his supposed crime he was thrown into a lion's den. Shadrach, Meshach, and Abed-Nego were cast into a fiery furnace because they refused to worship the image of the king. These men were not shown mercy - but were judged swiftly without it.
Over time large segments of the population hide from the king - terrified not just of his justice, but of his anger. There were wicked kings who killed men for being sad in their presence. Others were murdered because the king either did not like them - or thought that they might be an adversary in the future - whether it was true or not. They hide themselves because a wicked king or ruler is untrustworthy in his judgment. They don't know what might come next - or who might be killed for just looking a little suspicious.
One might honestly ask, “How do we know whether a ruler is righteous or wicked?” Because we are reading from God’s revelation, the Bible - that question is easy to answer. The king will be judged like every other person in the kingdom. He will fall under the same standards in the Word of God as everyone else does. The Bible knows no respect of persons - even kings and rulers. Thus, when a king sins, God will send a prophet to rebuke him for his wickedness. You can ask David about that one. There is not one standard for the ruling class and another for the people. All are held to the same standard of godliness.
The wise man desires a righteous leader to rule or to triumph. Such a leader will lead according to God’s will and direction. He will judge based upon truth - and it is truth that does not change with the winds of societal evolution. He will formulate laws with his ear tuned toward heaven rather than with his finger stuck up in the air trying to ascertain what the people what at any one moment. Such a leader’s kingdom or nation will have great glory - for it will shine with God’s righteousness and mercy. Rather than listen to the pundits, the political hawkers, and the professional politicians - we would be wise to listen to every word that proceeds out of the mouth of God.