The NET Bible notes help:
The entire phrase fear has to do with punishment may be understood in two slightly different ways: (1) “fear has its own punishment” or (2) “fear has to do with [includes] punishment.” These are not far apart, however, and the real key to understanding the expression lies in the meaning of the word “punishment” (κόλασις, kolasis). While it may refer to torture or torment (BDAG 555 s.v. 1) there are numerous Koine references involving eternal punishment (2 Macc 4:38; T. Reu. 5:5; T. Gad 7:5) and this is also the use in the only other NT reference, Matt 25:46. In the present context, where the author has mentioned having confidence in the day of judgment (4:17), it seems virtually certain that eternal punishment (or fear of it) is what is meant here. The (only) alternative to perfected love, which results in confidence at the day of judgment, is fear, which has to do with the punishment one is afraid of receiving at the judgment. As 4:18b states, “the one who fears [punishment] has not been perfected in love.” It is often assumed by interpreters that the opposite to perfected love (which casts out fear) is imperfect love (which still has fear and therefore no assurance). This is possible, but it is not likely, because the author nowhere mentions ‘imperfect’ love, and for him the opposite of ‘perfected’ love appears to be not imperfect love but hate (cf. 4:20). In other words, in the antithetical (‘either/or’) categories in which the author presents his arguments, one is either a genuine believer, who becomes ‘perfected’ in love as he resides in love and in a mutually indwelling relationship with God (cf. 4:16b), or one is not a genuine believer at all, but one who (like the opponents) hates his brother, is a liar, and does not know God at all. This individual should well fear judgment and eternal punishment because in the author’s view that is precisely where such a person is headed.
John does follow fairly ridged, binary categories in this letter.
The other angle to look at this from the meaning of teleios <5046> (translated "perfect" in verse 18):
1) brought to its end, finished
2) wanting nothing necessary to completeness
3) perfect
The primary sense of the word in Greek has more to do with completion ("she ran the perfect race") rather than meeting a particular standard ("the telescope mirror was perfectly shaped"). In English, we tend to think of perfection the other way around. The word comes from telos <5056>, which is where we get the word teleology, the study of the purposes or, as Aristotle called it, final causes. In the context of the final judgment, it seems the connotation of completeness must be in John's mind.
But I don't think the translation "perfect" is inappropriate. That's because the love referenced is not our love for other people or for God, but God's love for us:
We love because he first loved us.—1st John 4:19 (ESV)
In this sense, the love that John is describing is perfect. After all, it isn't the love that we have for God which gives us confidence on the day of judgment, but His love for us. Presumably, we are afraid at times because we are not properly connected to God's perfect love rather than because our love is imperfect.