God does look at the heart. The bible, speaking about the heart of man, of course, is not referring to the physical heart, but the soul. Many types of thoughts proceed from the heart, both good and bad. Even the scriptures tell us that a person’s heart is a reflection of who they are.
Proverbs 27:19 … as water reflects the face, a man’s heart reflects the man…
We have even heard it said, that’ he/she has a good heart’, but in actuality, a person never really knows what is in their own heart, until it's revealed. They can do their best to maintain a morally upright life and even try to practice the commandments, but the unfortunate truth of it all, is that no matter how good we believe we are, this is not what we will be judged by in the end.
Many people, especially those weak in their faith, believe that by doing good and trying to abstain from evil, they should be allowed into Heaven. Not only is this a false belief, but God specificaly laid out the only way into His kingdom. Jesus said I am the way, the truth and the life, no man comes to the Father except through me.
The heart does play a very important part in believing. Romans 10:9 tells us that ‘if we confess with our mouth that Jesus is Lord, and believe in our hearts that God raised him from the dead, we will be saved’.
Our own righteousness, or moral code, could never equal the righteousness we need in order to enter God’s kingdom. Through faith , Jesus’ righteousness is given to us, and through that righteousness alone, we are found guiltless. On the day of judgment, God will not be welcoming us into the kingdom based on our good deeds, good works, or having a good heart, but by our faith in Jesus Christ and what He accomplished.
If we trust our hearts, we will find that our hearts are deceiving. There is no goodness or righteousness apart from Christ. If we trust in our deeds, we will always fall short, never being able to obtain the true righteousness which comes by faith.