What role do good works play in our salvation?
The Bible says we are saved by grace (unmerited favor) through faith and not by our good works. Grace is doing something good for somebody who doesn't deserve it.
Notice that in the passages below like Ephesians 2:8-9, 2 Timothy 1:9, Titus 2:11 and Titus 3:7, the Bible clearly says that we are saved by grace and not good works. Interestingly, though, those passages are also followed closely by passages that describe the importance of good works. Our good works do not save us, but they follow naturally when a person is saved by grace, because believers were "created in Christ Jesus for good works, which God prepared beforehand that we should walk in them."
Our good works don't prove anything to God. He already knows if we have accepted His grace through faith. Rather, our good works are evidence to the rest of the world that a real change has occurred in us. When Christ changes a person's heart, He inspires them to good works. Like a healthy fruit tree naturally produces fruit, a healthy Christian life naturally produces good works. As James says in 2:14-26, faith without works is dead.
Here are some helpful Bible verses pertaining to the topic:
For by grace you have been saved through faith, and that not of yourselves; it is the gift of God, not of works, lest anyone should boast.
For we are His workmanship, created in Christ Jesus for good works, which God prepared beforehand that we should walk in them.
2 Timothy 1:9
(God) who has saved us and called us with a holy calling, not according to our works, but according to His own purpose and grace which was given to us in Christ Jesus before time began
2 Timothy 2:21
Therefore if anyone cleanses himself from the latter, he will be a vessel for honor, sanctified and useful for the Master, prepared for every good work
For the grace of God that brings salvation has appeared to all men
who gave Himself for us, that He might redeem us from every lawless deed and purify for Himself His own special people, zealous for good works.
Remind them to be subject to rulers and authorities, to obey, to be ready for every good work,
But when the kindness and the love of God our Savior toward man appeared, not by works of righteousness which we have done, but according to His mercy He saved us, through the washing of regeneration and renewing of the Holy Spirit, whom He poured out on us abundantly through Jesus Christ our Savior, that having been justified by His grace we should become heirs according to the hope of eternal life.
This is a faithful saying, and these things I want you to affirm constantly, that those who have believed in God should be careful to maintain good works. These things are good and profitable to men.
What does it profit, my brethren, if someone says he has faith but does not have works? Can faith save him? If a brother or sister is naked and destitute of daily food, and one of you says to them, "Depart in peace, be warmed and filled," but you do not give them the things which are needed for the body, what does it profit? Thus 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 without your works, and I will show you my faith by my works. You believe that there is one God. You do well. Even the demons believe--and tremble! But do you want to know, O foolish man, that faith without works is dead? Was not Abraham our father justified by works when he offered Isaac his son on the altar? Do you see that faith was working together with his works, and by works faith was made perfect? And the Scripture was fulfilled which says, "Abraham believed God, and it was accounted to him for righteousness." And he was called the friend of God. You see then that a man is justified by works, and not by faith only. Likewise, was not Rahab the harlot also justified by works when she received the messengers and sent them out another way? For as the body without the spirit is dead, so faith without works is dead also.