John is urging his readers to think and plan ahead: to realize that the Lord's return is an inescapable reality which we can face with assurance, not shame.
God sees and knows our shortcomings. And that is why we daily need His undeserved favour—grace. In spite of us, His infinite love is unconditional. Our relationship to God is not based on our perfection, but on Christ’s.
It's easy to become entangled in bad stuff. Instead of running from temptation, we often run right into it. Living life well requires making the choice to do what's right—regardless of what everyone else is doing.