Doing good works does not earn anyone heaven. Why? Because even if our good works did outweigh our bad, (which isn't humanly possible) there is still the bad to contend with, and Scripture teaches if we keep the WHOLE law and stumble in one place, we're guilty of all, (James 2:20) and the wages of sin is death, (Romans 6:23) and there's coming a day of judgment (Hebrews 9:27).
Here's a test:
1. Have no other Gods before me (don't love anyone or anything more than God and be fully devoted to Him every single day).
2. Don't make any idols and worship them (again, this can include loving/worshiping anything other than/more than God).
3. Don't take the Lord's name in vain ("I will not hold him guiltless who takes my name in vain." - Exodus 20:7).
4. Remember the Sabbath, to keep it holy.
6. Do not murder (Jesus said if you hate your brother you are guilty of murder- he looks at the thoughts and intentions of our hearts).
7. Do not commit adultery (Jesus said if you look upon someone with lust you're guilty of adultery).
8. Do not steal
9. Do not bear false witness against your neighbor (lying)
10. Do not covet (want what others have).
How have you done? I'm guilty of breaking every single one. And if you were to add up the number of times I've broken these over my entire life, the number would be staggering. And btw, even our "good deeds" are only truly good if they have the right motive (to glorify God and love our neighbor by pointing them to Him). Precisely why we need a Savior and why God sent His Son, Jesus, into the world to be tortured, crucified, and die for sinners like us. God, the Father, poured out His wrath against sin and punished His own Son in the place of those who would trust in Him.
In street evangelism, there were also those who knew about Jesus, and they believed that they needed to have faith in Him, but they weren't trusting in Jesus alone for the forgiveness of their sins. Their formula for salvation was: Faith in Jesus + My Good Works = Salvation. The problem with this formula is that it negates the fact that when Christ died, He did it ALL. He said IT IS FINISHED. All the wrath of the Father against sin and against sinners was poured out on His own Son for those who would repent and trust in Him alone. So to say that my puny little good works are going to somehow add something to the finished work of Christ is to insult what He accomplished. It is ALL of grace.
I realize that James talks about faith without works being dead. This is true, but in the sense that when God saves us and we are born-again (John 3:3), he puts his Spirit in us and we are changed so that we want to and WILL produce good works. If someone says they have faith but there are no good works than there really is no faith. It is dead. We are not saved BY our works, they are evidence that we ARE saved. Again, it is all of grace.
"I do not set aside grace, for if righteousness could be obtained through the law, Christ died for nothing."- Galatians 2:21
"For by the works of the law, no human being will be justified in His sight, since through the law comes knowledge of sin." - Romans 3:20
"For all have sinned and fall short of the glory of God, and are justified by His grace as a gift, through the redemption that is in Christ Jesus." - Romans 3:23-24
"For it is by grace you have been saved, through faith, and this not of yourselves. It is a gift of God, not of works so no man can boast." - Ephesians 2:8-9
Can you think of any better news than this? Every other major religion in the world is about people striving to do good things to earn God's favor or earn paradise. Christianity is about God pouring out His lavish grace upon an undeserving people and granting them everlasting life by sending His own Son to die in their place.