"Death and life are in the power of the tongue, and they that love it shall eat the fruit thereof."
The righteous are judged by the works of faith.
This "righteousness" is the "righteousness of faith", for we are "justified by faith, without the works of the law."
The "works of faith" (faith without works is dead), are good works brought about BECAUSE of faith.
The righteous DO keep the law, but they do so BECAUSE of faith in Jesus Christ, and more accurately, the Holy Spirit does it through them.
"What shall we say then? Shall we sin that grace may abound? God forbid, how shall we who are dead unto sin live any longer therein?"
and
Romans 8
1There is therefore now no condemnation to them which are in Christ Jesus, who walk not after the flesh, but after the Spirit.
2For the law of the Spirit of life in Christ Jesus hath made me free from the law of sin and death.
3For what the law could not do, in that it was weak through the flesh, God sending his own Son in the likeness of sinful flesh, and for sin, condemned sin in the flesh: 4That the righteousness of the law might be fulfilled in us, who walk not after the flesh, but after the Spirit.
====
The "works of the law" are works, which however good they might be in and of themself, are done through self righteousness in an attempt to justify one's self through the law, which in fact could not justify.
for "..by the works of the law shall no man be justified." (gal. 2:16)
Consequently, the unrighteous are judged by the works of the law, which they cannot keep, but tried to keep due to unbelief and SELF righteousness, rejecting the Cross of Christ.
The "unrighteous" are not judged as such due to failure to keep laws, but rather due to Self Righteousness, which is ultimately a lack of faith (if they believed the Gospel, then they would not be self righteous). "If righteousness come by the law, Christ is dead in vain."
=====
In this manner, we see that the "Self Righteous" are judged according to their works, and since some of their works (really all of them) are sinful, they are judged by their sin. Since their sins are not "blotted out" they are judged by their sin, according to the law, and the law makes no excuse for sin. The penalty is death. They are judged by the words of their mouth, which is blasphemy, self righteousness, lies, false doctrine (if they did not believe the truth, they must have believed and taught falsehood), and so on. These are judged by the fact that they bore no fruit, and earned no talents, though they THOUGHT they were bearing fruit, but the only fruit they bare was in fact Cain's vegetables: the works of the flesh.
God demanded the Lamb, and they present the "good" works of their own sinful hands. They want the lion without the Lamb, but it cannot be so. The penalty for all of this, under the law, which is God's standard of righteousness, is death.
On the other hand, For the truly righteous, that is, those who are justified by faith, their sinful works are remembered no more, and in fact, the law itself is remembered no more, as not only have their "sins been washed away", but indeed, the law itself, the "handwriting of ordinances" has been blotted out for their sakes. These are then rewarded according to the works of faith, having already passed the judgement of faith. These are judged and rewarded by how much fruit they bare, by how many talents they earned. both the man who earned ten and the man who earned five entered into the kingdom, but they recieved different rewards for their works of faith. The man who earned ten even recieved what the man who earned none would have recieved, which is in agreement with Jesus' other parables.
So every person is in fact judged by the words of their mouth, whether good or evil, along with every other "work" they ever did, but this is done under a certain context, through the lense of "justification by faith".
In other words, people are justifed by faith, but they are rewarded according to their works.
justification is like finishing the race.
reward is like who gets what medal, but only those who finish get a medal.