Are people brought into a right relationship with God because God provides for their salvation, or must we do works in order to earn our place with God in the afterlife?
The Bible is pretty clear that God provides our salvation from our rebellion by himself, all we have to do is accept it.
Look at Romans 3:21-30:
21 But now apart from the Law the righteousness of God has been manifested, being witnessed by the Law and the Prophets,
22 even the righteousness of God through faith in Jesus Christ for all those who believe; for there is no distinction;
23 for all have sinned and fall short of the glory of God,
24 being justified as a gift by His grace through the redemption which is in Christ Jesus;
25 whom God displayed publicly as a propitiation in His blood through faith. This was to demonstrate His righteousness, because in the forbearance of God He passed over the sins previously committed;
26 for the demonstration, I say, of His righteousness at the present time, so that He would be just and the justifier of the one who has faith in Jesus.
27 Where then is boasting? It is excluded. By what kind of law? Of works? No, but by a law of faith.
28 For we maintain that a man is justified by faith apart from works of the Law.
29 Or is God the God of Jews only? Is He not the Godof Gentiles also? Yes, of Gentiles also,
30 since indeed God who will justify the circumcised by faith and the uncircumcised through faith is one.
Here’s theologian R.C. Sproul, to explain a passage from the Bible that seems to contradict the passages that teach that faith alone is sufficient for salvation.
Here’s James 2:18-24:
18 But someone may well say, “You have faith and I have works; show me your faith without the works, and I will show you my faith by my works.”
19 You believe that God is one. You do well; the demons also believe, and shudder.
20 But are you willing to recognize, you foolish fellow, that faith without works is useless?
21 Was not Abraham our father justified by works when he offered up Isaac his son on the altar?
22 You see that faith was working with his works, and as a result of the works, faith was perfected;
23 and the Scripture was fulfilled which says, “And Abraham believed God, and it was reckoned to him as righteousness,” and he was called the friend of God.
24 You see that a man is justified by works and not by faith alone.
Sproul explains the apparent conflict:
What James is saying is this: If a person says he has faith, but he gives no outward evidence of that faith through righteous works, his faith will not justify him. Martin Luther, John Calvin, or John Knox would absolutely agree with James. We are not saved by a profession of faith or by a claim to faith. That faith has to be genuine before the merit of Christ will be imputed to anybody. You can’t just say you have faith. True faith will absolutely and necessarily yield the fruits of obedience and the works of righteousness. Luther was saying that those works don’t add to that person’s justification at the judgment seat of God. But they do justify his claim to faith before the eyes of man. James is saying, not that a man is justified before God by his works, but that his claim to faith is shown to be genuine as he demonstrates the evidence of that claim of faith through his works.
So yes, works are important as a sign to others that you believe what you say you believe, but not important for balancing your sins. Your sins are already paid for by Jesus, what you do in your life doesn’t add or take away anything from that. But I will say that if you can see that a person is spending a great deal of their time performing actions that are consistent with a concern for God’s purposes and reputation, then that’s a good sign that his faith is in good shape. Yes, even if he doesn’t do as much Bible study, devotions, singing and praying as he should. The important thing about actions (works) is that you can look at a person’s life and see evidence that he is taking God seriously – that Jesus is his leader, and that Jesus’ character is informing their decision-making and prioritizing.