And I saw the dead, great and small, standing before the throne, and books were opened. Then another book was opened, which is the book of life. And the dead were judged by what was written in the books, according to what they had done.
(Revelation 20:12 ESV)
And if anyone's name was not found written in the book of life, he was thrown into the lake of fire.
(Revelation 20:15 ESV)
The idea of being judged based on what is in these books will either sound terrifying (if you're aware of the many ways you've failed to live up to your own standards, never mind God's standards) or encouraging (if you think that you've been a good person, or at least good in comparison to others).
It's easy to assume that the outcome of the books is good for some and bad for others but when we get to v15 we see that it's not the book of our lives that determines our fate, but whether our name is in the book of life. The books of our lives are not irrelevant, but when we are judged on them, everyone is heading to the lake of fire. Everyone's book will lead to just punishment. Our hope is not in trying to add more good things to that book to counteract the bad things already written. Our hope is that our name is in the book of life. It was written there by Jesus, permanently (Rev 3:5), before the foundation of the world (Rev 13:8).