For the eyes of the Lord are over the righteous, and His ears are open to their prayers.
~1 peter 3:12
Peter is addressing Christians, not judging the world. (The Christian position towards the world is not as judge, but as guide.) Nor is he drawing a line between Christians, between the more or less righteous.
He is teaching us how to pray.
We are not advised to hunger and thirst after the righteousness of others, but after our own. It is that personal desperation that solemnizes our prayer life, and draws God like a flower to the light.