If you are reading along wtih me, you will see that these verses are talking about God's righteous judgment on mankind. Some may be confused when first reading this as it seems that God is judging people on their works, not their faith in Jesus. But to assure you, these verses are not contradicting Ephesians 2:8-9, "For it is by grace you have been saved, through faith- and this is not from yourselves, it is the gift of God- not by works, so that no one can boast." But rather works, apart from works means nothing. Here are a couple of verses to remind you:
What good is it, my brothers, if someone says he has faith but does not have works? Can that faith save him? If a brother or sister is poorly clothed and lacking in daily food, and one of you says to them, “Go in peace, be warmed and filled,” without giving them the things needed for the body, what good is that? So also faith by itself, if it does not have works, is dead. But someone will say, “You have faith and I have works.” Show me your faith apart from your works, and I will show you my faith by my works. You believe that God is one; you do well. Even the demons believe—and shudder! Do you want to be shown, you foolish person, that faith apart from works is useless? Was not Abraham our father justified by works when he offered up his son Isaac on the altar? You see that faith was active along with his works, and faith was completed by his works; and the Scripture was fulfilled that says, “Abraham believed God, and it was counted to him as righteousness”—and he was called a friend of God. You see that a person is justified by works and not by faith alone. And in the same way was not also Rahab the prostitute justified by works when she received the messengers and sent them out by another way? For as the body apart from the spirit is dead, so also faith apart from works is dead.
We ourselves are Jews by birth and not Gentile sinners; yet we know that a person is not justified by works of the law but through faith in Jesus Christ, so we also have believed in Christ Jesus, in order to be justified by faith in Christ and not by works of the law, because by works of the law no one will be justified.
So there, our faith in Jesus is crucial, and through our faith in Jesus comes love- love that results in good works. Our deeds prove our faith in Jesus. If you say you believe in Christ, but your life does not display his love through good works, then you should re-analyze your faith in Him. Our lives should be evident of the work He has done in us.