A sincere desire to please God by keeping his law is both commanded and approved by him. However, human fallibility means that true righteousness must be the product of the Holy Spirit's work in the believer.
Righteousness includes keeping the laws of God
See also
Noah
Abraham
David
Hezekiah
Simeon
God requires righteousness of his people
God loves those who are righteous
The righteous receive blessing from God
the LORD watches over them
they are secure
their prayers are effective
The righteous may suffer for their faith