“When the Son of Man comes in His glory, and all the angels with Him, then He will sit on the throne of His glory. All the nations will be gathered before Him, and He will separate them one from another, just as a shepherd separates the sheep from the goats. He will put the sheep on His right and the goats on the left.
Then the King will say to those on His right, ‘Come, you who are blessed by My Father, inherit the kingdom prepared for you from the foundation of the world. For I was hungry and you gave Me something to eat; I was thirsty and you gave Me something to drink; I was a stranger and you took Me in; I was naked and you clothed Me; I was sick and you took care of Me; I was in prison and you visited Me.’
“Then the righteous will answer Him, ‘Lord, when did we see You hungry and feed You, or thirsty and give You something to drink? When did we see You a stranger and take You in, or without clothes and clothe You? When did we see You sick, or in prison, and visit You? ’
“And the King will answer them, ‘I assure you: Whatever you did for one of the least of these * brothers of Mine, you did for Me.’
Then He will also say to those on the left, ‘Depart from Me, you who are cursed, into the eternal fire prepared for the Devil and his angels! For I was hungry and you gave Me nothing to eat; I was thirsty and you gave Me nothing to drink; I was a stranger and you didn’t take Me in; I was naked and you didn’t clothe Me, sick and in prison and you didn’t take care of Me.’
“Then they too will answer, ‘Lord, when did we see You hungry, or thirsty, or a stranger, or without clothes, or sick, or in prison, and not help You? ’
“Then He will answer them, ‘I assure you: Whatever you did not do for one of the least of these, you did not do for Me either.’
“And they will go away into eternal punishment, but the righteous into eternal life.” (Matthew 25:31-46)
Little children, let no one deceive you! The one who does what is right is righteous, just as [Christ] is righteous. (1 john 3:7)
Righteousness doesn’t come from saying a prayer, being baptized, going to church, or reading scripture. We are righteous if our faith motivates us to do good works in obedience to Christ. And if we remain in Christ, there will be no fear of condemnation on the Day of Judgment.