Romans 8:10 (KJV):
10 And if Christ be in you, the body is dead because of sin; but the
Spirit is life because of righteousness.
To be able to properly answer your question of “how does the concept of ‘righteousness’ cause the Spirit to be ‘life’ in Romans 8:10?”, we must first look to the lead-in context back in Chapter 7. We need to understand the contrast between the “flesh” and the “spirit”.
Romans 7:4-6 (KJV):
4 Wherefore, my brethren, ye also are become dead to the law by the
body of Christ; that ye should be married to another, even to him who
is raised from the dead, that we should bring forth fruit unto God. 5
For when we were in the flesh, the motions of sins, which were by the
law, did work in our members to bring forth fruit unto death. 6 But
now we are delivered from the law, that being dead wherein we were
held; that we should serve in newness of spirit, and not in the
oldness of the letter.
In verse 4, Paul states that we have become dead to the law (Law of Moses) because of the sacrifice of Christ. This is important in answering your question because it shows that Christ’s sacrifice was effective to destroy that law’s hold on us, in that we have become “dead to the law”; the law has no effect on us any longer. This truth then allows the Spirit of God to work in our lives.
In verses 5-6, Paul starts a contrast between the flesh (ie, living by our own will and power) and the spirit. He says that while we walked according to our own flesh (and apart from Christ’s sacrifice) the law was applicable to our lives and the result was death since we could not attain righteousness on our own. As long as the law lives and we are attempting to fulfill its requirements by our own works, then we are spiritually dead since our sin prevents us from keeping the law perfectly.
He also goes on to say in verse 6 that we have been delivered from the law that we should now serve in “newness” of the Spirit and not of the “oldness” of the letter (ie, Law of Moses).
In chapter 8, Paul then goes on to tell us that we who now live by faith, trusting in the sacrifice of Christ to cover our sin, have made the journey from death to life because we have also made the related journey from trusting our own flesh to trusting the Spirit of God.
Romans 8:1-2 (KJV):
1 There is therefore now no condemnation to them which are in Christ
Jesus, who walk not after the flesh, but after the Spirit. 2 For the
law of the Spirit of life in Christ Jesus hath made me free from the
law of sin and death.
Here, Paul states that there is no condemnation of the law (since we are now dead to the law through the sacrifice of Christ) to those who have left off trusting in our own flesh (sinful will) and who are now trusting Christ by faith (who walk “after the Spirit”)
Verse 2 states that the “law of the Spirit of the life in Christ” has freed me from the law of sin and death. The term “law” in the phrase “law of Spirit of the life in Christ” is not the law as in the Law of Moses. It means more of a figurative principal. That spiritual principal of trusting in Christ instead of my own will has freed me from the bondage of literally having to keep the Law of Moses which brings with it sin and death.
Romans 8:3-4 (KJV):
3 For 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: 4 That the righteousness of the
law might be fulfilled in us, who walk not after the flesh, but after
the Spirit.
V3: Because of sin, the law could not produce in us the righteousness of God because it was weak due to our own sinful flesh (we desire to do good but are unable to fulfill it – Romans 7:14-23). However, Christ came to condemn sin in His flesh that the righteousness of law might be fulfilled in us who are not walking after the flesh (ie, trusting in our own sinful and corrupt works) but are now walking (trusting) in the Spirit ie, trusting in Christ alone.
Romans 8:5-9 (KJV):
5 For they that are after the flesh do mind the things of the flesh;
but they that are after the Spirit the things of the Spirit. 6 For to
be carnally minded is death; but to be spiritually minded is life and
peace. 7 Because the carnal mind is enmity against God: for it is not
subject to the law of God, neither indeed can be. 8 So then they that
are in the flesh cannot please God. 9 But ye are not in the flesh, but
in the Spirit, if so be that the Spirit of God dwell in you. Now if
any man have not the Spirit of Christ, he is none of his.
Here in these verses Paul continues to contrast the flesh (living by our will to work our own righteousness) verses the Spirit (righteousness obtained through Christ). Notice that to be carnally/fleshly minded is death while to be spiritually minded is life.
Now here comes your key verse.
10 And if Christ be in you, the body is dead because of sin; but the
Spirit is life because of righteousness.
This is the resurrection from the dead! If the Spirit of Christ is in us (those that have repented from their own dead works of righteousness – Hebrews 6:1 – and are now trusting in Christ) our body is now dead because of sin which is metaphor for the fact that we are now crucified with Christ; we partake of His death. However, because we have the Spirit of God in us, we are raised to newness of life again because Christ has fulfilled the law and has given (imputed) us His righteousness!