The author calls himself an eyewitness of Jesus’ life (chapter 1:1-3) and expresses himself with the authority of a respected, elder spiritual leader. In connection with John’s gospel all of this points to the Apostle John as author of the epistle (compare with notes on John’s Gospel).
The wide recognition in the early church does also confirm the above. The first to cite from John’s First Epistle is Polycarp of Smyrna (around 70 to 155 AC) who himself knew John personally. (The quotation is not explicitly attributed to John, though.)
Further references are made by Irenaeus (around 140 to 202 AC), Clemens of Alexandria (around 150 to 215 AC), Tertullian (around 160 to 220 AC), Papias (around 65 to 150 AC according to Eusebius) and the Muratori Canon (end of 2nd century). Modern criticism tends to suggest that the epistle was written either by a “presbyter called John” or by a student of the apostle John.
Most researchers date the epistle towards the end of the first century that is between 90 and 100 AC (the Gospel of John is dated at around the same time). It is probably not possible to state whether the Epistle or the Gospel of John has been written first.