Kindred souls gravitate toward each other spontaneously, as it were, for with each other they feel as though they are with their own family, at home, while with others they feel like foreigners, as though they were abroad. When they are with kindred souls, they enjoy the fullest freedom and find life totally delightful.
We can see from this that the good gathers everyone together in the heavens, and that angels are differentiated by what good they do. Still, it is not the angels who gather themselves, but the Lord, the source of all that is good. He leads them, unites them, differentiates them, and keeps them in freedom to the extent that they are engaged in what is good. So he keeps every individual in the life of his or her own love, faith, intelligence, and wisdom—and therefore in happiness.
Further, people of similar quality all recognize each other there just the way people in this world recognize their neighbors and relatives and friends, even though they may never have seen each other before. This happens because the only relationships and kinships and friendships in the other life are spiritual ones, and are therefore matters of love and faith.
I have often been allowed to see this when I was in the spirit and therefore out of body and in the company of angels. Then some of them looked to me as though I had known them from infancy, while others seemed totally unfamiliar. The ones who looked as though I had known them from infancy were the ones who were in a state like that of my own spirit, while the unfamiliar ones were in dissimilar states.
from Heaven and Hell, Sections 44-46