John is an elder by now. He's in his 80s or 90s. He's seen life.
John's letter is written to a congregation in the first century. Some false teachers have caused chaos. They have taught things about God that aren't true.
John wants His congregation to know that they know, to have clarity and truth about who God is, and how we relate to him.
Of course, God in his divine plan knew that we also would need such a letter. In our chaotic world where so many things have become subjective we need something to base our lives on.
We need to know that we know.
John had discovered what was real in life and he wanted everyone to know the realness of fellowship with God.
He wanted everyone to know that real fellowship with God changes us. He wanted us to know that holiness in our life matters. He wanted us to be aware of our sins, and to acknowledge and confess them. He wanted us to know these things, so that we wouldn't sin, but that if we did, we had Jesus on our side.
John had clarity and he wants us to have it too.
In preparation, I encourage you to read 1 John 1 through Chapter 2 verse 2.