If our salvation depended on how good we were, then you would be right: It would be prideful and conceited for someone to say they are among “those whose names are written in the Lamb’s book of life” (Revelation 21:27). They would be saying they were better than other people–so good, in fact, that God would have to let them into heaven.
But listen: You and I will never be good enough to get into heaven on our own! The reason is because God is pure and holy, and even one sin–just one–would be enough to keep you out of heaven. God does not take our good deeds and bad deeds, and weigh them against each other. Sin is an offense to Him; as the Bible says, “whoever keeps the whole law and yet stumbles at just one point is guilty of breaking all of it” (James 2:10).
This is why we need Christ, for He came into the world to take away our sins. We cannot remove our sins or our guilt–but Christ can, because He was the sinless Son of God. When we come by faith to Him, all our sins are transferred to Him, and we are forgiven. Yes, we can know our names are written in God’s book–because of Christ. Don’t trust in your own goodness, but trust Christ and what He has done for you. By faith commit your life to Him today.