Within Christianity, the belief that humans become angels seems to stem from a misinterpretation of Jesus' words:
For in the resurrection they neither marry nor are given in marriage, but are like angels in heaven. (Matthew 22:30)
And Jesus said to them, “The sons of this age marry and are given in marriage, but those who are considered worthy to attain to that age and to the resurrection from the dead neither marry nor are given in marriage, for they cannot die anymore, because they are equal to angels and are sons of God, being sons of the resurrection. (Luke 20:34-36)
It seems many people incorrectly interpret "like" and "equal to" to mean "identical to."
Mainstream Christianity has never taught this; the early church fathers argued over many things concerning angels (whether they are only spirit or have material bodies, what categories of angels exist, etc.), but it doesn't look like they had to argue against the idea that men became angels. Not one of the thirteen commentaries I've read make the claim (or even leave open the possibility).
Outside mainstream Christianity, a few groups do teach that humans become angels:
According to the Latter Day Saints:
Therefore, when they are out of the world they neither marry nor are given in marriage; but are appointed angels in heaven, which angels are ministering servants, to minister for those who are worthy of a far more, and an exceeding, and an eternal weight of glory.
For these angels did not abide my law; therefore, they cannot be enlarged, but remain separately and singly, without exaltation, in their saved condition, to all eternity; and from henceforth are not gods, but are angels of God forever and ever. (D&C 132:16-17)
And LDS teaching on angels:
There are two kinds of beings in heaven who are called angels: those who are spirits and those who have bodies of flesh and bone. Angels who are spirits have not yet obtained a body of flesh and bone, or they are spirits who have once had a mortal body and are awaiting resurrection. Angels who have bodies of flesh and bone have either been resurrected from the dead or translated.
The Swedish philosopher/scientist-turned revelator Emanuel Swedenborg, in his book Heaven and Hell published in 1758, wrote that angels are man's perfect form (they are the same race; angels are pure/purified humans).
... heaven is a communion -- sharing all it has with each one, and each one sharing all he has from this communion. An angel is a recipient, and is thus heaven in least form... Man, too, as far as he receives heaven, is so far a recipient, a heaven, and an angel. This is described in the Apocalypse in the words, He measured the wall of the holy Jerusalem a hundred and forty and four cubits, the measure of a man, that is of an angel (xxi, 17). [NKJV, ESV]