When the righteous thrive, the people rejoice; when the wicked rule, the people groan. (NIV)
When the [uncompromisingly] righteous are in authority, the people rejoice; but when the wicked man rules, the people groan and sigh. (AMP)
When the righteous are in authority, the people rejoice: but when the wicked beareth rule, the people mourn. (KJV)