The dating of John's letters and the fourth Gospel are the subjects of speculation. We cannot know exactly when they were written, or in what order. It is generally agreed by most scholars that the Gospel of John, or at least an early version of it, was written first but that as a result of confusion or misinterpretation arising from this Gospel John later wrote an explanation or commentary that we now know as the First Epistle of John (although it doesn't have any of the usual characteristics of a 'letter' or 'epistle' and it would be more accurate to regard it as an explanatory treatise on the Gospel). It's possible that 2 John and 3 John were written as covering letters to individuals or churches and sent along with the treatise we call 1 John. It's also possible that around the same time a new beginning and conclusion were added to the fourth Gospel (which would explain why the opening and concluding verses of the Gospel and 1 John are so similar).
Precisely what the issues were that John was addressing in 1 John is also open to speculation. Based on evidence from Iranaeus (c. AD 180), the Nag Hammadi texts, and elsewhere, we can be fairly certain that John was dealing with an early form of the philosophical movement we now call Gnosticism (from the Greek gnosis = knowledge) because knowledge played a major and central role in their understanding of salvation.
What we do know from 1 John is that there was a connection between the doctrines taught by certain people in the churches with which John was involved, and their behaviour. It appears that the immediate reason for writing this treatise is that these people had recently broken away from the other Christians in the area: "They went out from us, but they did not really belong to us. For if they had belonged to us, they would have remained with us; but their going showed that none of them belonged to us" (1 John 2:19). From this verse this group of people are commmonly referred to as the "separatists" or "secessionists" for convenience.
From 1 John we can determine that the doctrine which led to this division involved the nature of Christ and whether or not He "has come in the flesh" (4:2). Most scholars have concluded that the separatists embraced a Christology which elevated Christ's divinity at the expense of His humanity (e.g. see G.M. Burge The Epistles of John). However, John pays at least as much attention to the ethical behaviour that resulted from this teaching as he does to the theological issues. For John it was not simply a matter of whether their theology was right or wrong, but about the implications it had for Christian living. The separatists boasted that they "know God", but they hated their fellow Christians who did not have the same "knowledge" (2:9; 4:20). A large part of 1 John deals with the importance of love as the defining characteristic of a Christian (e.g. 3:11-18; 4:8-10).
"While christology was the main battleground in the community, the tangible expression of these disagreements came in the form of open conflict and hostility. Faulty christology spilled into unethical conduct" (G.M. Burge).John says that the separatists are "not obedient" and they are not "walking in the light". There is no evidence that they were living immoral lives. What made them "disobedient" was that they were intolerant of those who disagreed with them, and conflict resulted from their superior 'knowledge'. John refers to this intolerance as "hating" their fellow Christians.
Eventually this intolerance led to the group with superior knowledge separating themselves from the rest of the Christian community, and John says that their secession was evidence that they never truly belonged.
I believe there is a warning here for modern believers who make their knowledge of certain doctrines a reason for separating from other Christians, or feeling superior to them. Divisions within the Christadelphian community have largely been over fine details of doctrine. Sociologist Bryan Wilson observed that these differences are often of such a detailed nature that an outsider wouldn't be able to see any difference at all. However, the heatedness of the conflict, the harsh words exchanged and the abiding nature of the divisions are often out of all proportion to the importance of the doctrinal details themselves. I believe this is precisely the kind of thing John is talking about: a doctrinal difference which leads to 'hatred' of fellow-Christians.
Going beyond the divisions within the Christadelphian community, I personally believe that Christadelphian separation from the wider Christian community should also be judged as the kind of 'separatism' that John condemned. Differences of understanding should be discussed and healthy dialogue encouraged. Common ground should be established and bridges built. I am not suggesting that doctrinal distinctives should be ignored or forgotten. However, fellow Christians should always be treated with respect and in love, and acknowledged as brethren.
It seems to me that when Paul dealt with the problem of Judaisers and legalists, and when John dealt with the issue of the separatists that they were dealing with the same kind of things that our Lord taught against when He encouraged inclusion, not exclusion, and when He demonstrated that holiness, not defilement, was contagious. There is no need to separate from people with differing views - we won't be 'defiled' or contaminated by our contact with them. To the contrary, when light comes into contact with darkness it will always overcome the darkness. Holiness is transferred, not defilement. 'Knowledge' does not transform people - love does.