My dictionary gives the definition of "righteous" as "just, upright, morally good, equitable, deserved, justifiable, fitting."
The Old Testament Hebrew word "sedak" and its derivatives mean all of these and therefore, one has to look at the context to understand the meaning. A righteous weight is one that meets a standard. A righteous judge renders just verdicts.
Righteousness is often used as a personal quality in a king especially, in the ideal or messianic king. In Isaiah, righteousness designates characteristics of the messianic king: "Justice shall be the band around his waist" (11:5).
Law of God
Righteousness can mean innocence when accused as Job was. The standard is the law so one can say that the law is just, especially the law of God. Therefore, righteousness is conduct in accordance with laws or the law of God.
To seek "sedak" is to seek God who is found through right conduct as opposed to sin and wickedness. Right conduct is being honest and truthful, not deceptive nor deceitful. Righteousness is the path of life that saves from death and is rewarded by God.
Sometimes, "sedak" means deliverance, vindication or salvation. It identifies a claim, specifically a claim on God to deliver the righteous from evil. In Genesis, Abraham's faith is righteousness; it entitles him to fulfillment of the promises God made to him.
Intercession
Righteousness is the work of God who intervenes on our behalf. The righteous are in a right relationship with God whom they serve with faithfulness. God does not turn his face from, but blesses, them. The fruits of "sedak" are well-being and security. These few examples give us a glimpse of the meaning of righteousness in the Old Testament.
The New Testament employs righteousness like the Old Testament but often with a Christian twist. In many texts, the righteous person is one of good or proper conduct but with the Christian emphasis of "before God" or "in the Lord."
God's judgments are righteous: "Jesus delivered himself up to the one that judges justly" (1 Peter 2:23). In Matthew 10:14, God is the righteous one in whose name the cup of water is given.
Jesus is mentioned as the righteous one in Peter's sermon after Jesus' crucifixion: "You disowned the holy and just one and preferred instead that a murderer be released" (Acts 3:14).
Paul developed a special Christian meaning to the word distinct from Old Testament usage. Righteousness for Jews is observance of the law. Gentile Christians had to be righteous without the law. This new righteousness came through Christ.
God's grace
Paul concludes that all are sinners and, therefore, can only be righteous by being made righteous by God's grace through the death and resurrection of Christ. In Philippians 3:9, he calls righteousness of the law "my own righteousness" in contrast to righteousness that comes from God through Christ. Righteousness is the work, not of humans, but of God.
Therefore, righteousness for Christians is goodness through deliverance from sin by salvation in Jesus. In the Beatitudes, those who hunger and thirst for righteousness, for God's saving grace, are manifested through their works of mercy. The Christian who acts justly is righteous like Jesus.
Various translations
As you read or listen to Scripture, continue to focus on the use of righteous and its various translations. You will understand its meaning more fully and deeply.
One strong example is depicted in Jesus' parable of the Pharisee and the publican (Luke 18:9-14), addressed to the self-righteous.
In his prayer, the Pharisee tells God about all the great things he does and brags that he's not like sinners, including the publican. In other words, he's self-sufficient; he doesn't need God; he makes himself righteous; he is self-righteous.
The publican begs God to make him righteous by forgiving his sins. What does Jesus think? He praises the publican: "This man went home justified rather than the other (the Pharisee), for all who exalt themselves will be humbled but those who humble themselves will be exalted" (v.14).