ב''ה
The situation is a bit different for Jews compared to Gentiles. The Israelite nation arrived and camped at Mount Sinai to receive the Torah from G-d. When they encamped, it was “as one person, with one heart.” (See Rashi on Exodus 19:2.) Their complete unity with each other, and their unity of purpose, was necessary in G-d’s eyes for them to be the ones to receive His Torah, the purpose of which is to bring G-d’s unity into the world.
At that time, before G-d agreed to give them the Torah, He required that they would all take upon themselves, and on behalf of all Jews for all future generations, that every Jew would be responsible for all other Jews. This applies specifically in matters of the Torah and the 613 Jewish commandments. It is a spiritual soul-bond that extends in some ways beyond the boundaries of physical life.
In contrast, each Gentile is responsible for his or her own actions and beliefs, and stands on his/her own merits. A Gentile is not held accountable in G-d’s judgment for the independent actions and beliefs of another person. (Of course, it is wrong for anyone to mislead another person into unknowingly committing a sin, which is called “putting a stumbling block before the blind”.) Likewise, a good deed that one Gentile decides to do isn’t adding an extra merit to another Gentile, that the other Gentile didn’t have before.
But G-d hears all prayers, and He hears the prayer of a Gentile who is asking Him to please have extra mercy or benevolence on the soul of a deceased person. Surely the one who is praying for that is doing so because of some good that he or she had seen in the deceased person, and/or because of their love or friendship. A person won’t have much love or friendship for someone who is all bad (if there is such a thing). So the person’s prayer will arouse G-d to look more specifically at those good aspects of the deceased person’s life. Then those things can then be judged over again for the good to carry more weight (in light of their importance in the eyes of the person who is praying) in determining the verdict and the reward for the soul.
Also, giving proper charity adds more power to a person’s prayers, because it physically demonstrates the sincerity of what the person is asking of G-d. It also gives the person more merit for G-d to grant what is being prayed for.
There can be an emotional bond between souls that continues after the end of physical life.
There is a bond between the souls of close family members. When it is written in the Torah about someone who passed away, it sometimes uses the expression “he was gathered unto his people”, even in regard to Non-Jews. For example, Bereishis Rabbah says that Abraham’s father Terach, who had been an idolater, repented before he died. This explains why it says in Genesis 25:8 that when Abraham died, “he was brought in to his people”. His soul was reunited with the soul of his repentant father Terach in the Heavenly paradise.
In general, a deceased person’s soul is brought to be with the souls of his deceased relatives in the spiritual realm where they are receiving their reward. We see in practice that even for Gentiles, when they are close to passing away, many say that they are being visited by their deceased relatives who have come to welcome them to the spiritual realm.