Today I’ll address a common question:
The Bible says no one is righteous, so to whom are the Psalms and Proverbs referring when they talk about “the righteous”?
That’s a great question. We read that all have sinned and no one is righteous in both the Old and New Testament: “…no one living is righteous before you” (Psalm 143:2); “…None is righteous, no, not one” (Romans 3:10).
So what do we make of verses like these?
for the Lord knows the way of the righteous, but the way of the wicked will perish. ~Psalms 1:6
teach a righteous man, and he will increase in learning. ~Proverbs 9:9
The lips of the righteous know what is acceptable, but the mouth of the wicked, what is perverse. ~Proverbs 10:32
Though the question arises most often about Psalms and Proverbs, verses about the righteous occur elsewhere:
Again, if a righteous person turns from his righteousness and commits injustice … ~Ezekiel 3:20
If he rescued righteous Lot … ~2 Peter 2:7
And they [Zechariah and Elizabeth] were both righteous before God, walking blamelessly in all the commandments and statutes of the Lord. Luke 1:6
The answer has to do with the different ways the word righteous is used.
The standard for righteousness is God’s righteousness, and no person is righteous on his or her own. We can’t be righteous on our own because “all have sinned and fall short of the glory of God” (Romans 3:23).
However, Scripture calls some people the righteous: these are those whose faith in and love for God causes them to order their lives according to God’s laws (Psalm 1:2; 1 John 3:7); God bestows righteousness on them because he counts faith as righteousness (Genesis 15:6; Philippians 3:9).
In the New Testament, God makes righteous those who put their faith in Jesus. In both Testaments, the righteous aren’t sinless, but when they sin, they seek God’s forgiveness, and God cleanses them of unrighteousness (Psalm 51:9-10; 1 John 1:9).
Beeson Divinity School professor of Old Testament and Hebrew, Allen P. Ross puts it this way:
The basic meaning of “righteous” has to do with conforming to the standard; in religious passages that standard is divine revelation. The righteous are people who have entered into covenant with God by faith and seek to live according to his word. The covenant that they have makes them the people of God—God knows them, and because God knows them, they shall never perish. They may do unrighteous things at times, but they know to find forgiveness because they want to do what is right. 
In contrast, the wicked are those who live as they see fit. The word translated wicked in Psalm 1 above can refer either to those who simply don’t love God, or to those who reject God’s laws, or to those committed to violence and oppression.
Righteous Living versus Righteous Standing
When reading Scripture, it’s important to differentiate between righteous living—ordering one’s life by God’s commands, including the command to love God—and righteous standing—the righteousness God gives people who live by faith (justification).
Righteous living without faith (simply keeping a certain moral code) never leads to righteous standing, whereas righteous standing based on faith always leads to righteous living.
Just keeping a moral code cannot lead to righteous standing because no person is sinless and God gives righteous standing to only those with faith in him (Romans 3:20). Additionally, those without faith in God always break the greatest command:
And he [Jesus] said to him, “You shall love the Lord your God with all your heart and with all your soul and with all your mind. This is the great and first commandment.” ~Matthew 22:37-38
On the other hand, righteous standing always leads to righteous living because those with faith in God love and trust him enough to obey him (albeit imperfectly) and because God works in them to change them (Psalm 94:12; Philippians 2:13; Hebrews 12:11; 1 John 3:10). It may take time to overcome weaknesses and old habits, but the Holy Spirit will produce growth.
For you bless the righteous, O Lord; you cover him with favor as with a shield. ~Psalms 5:12 (ESV)