Homer's Odyssey contains several references to Agamemnon's return from Troy. The main reason for this seems to be to allude to and to create parallels with Odysseus' own situation.
Both heroes were trying to return to Greece from Troy. Both heroes had wives and children waiting for them at home. In Agamemnon's case, however, his wife had taken a lover during her husband's absence and the two of them were plotting to kill Agamemnon when he returned home.
In contrast to Agamemnon's deceitful wife, Clytemnestra, the Odyssey presents us with Odysseus' faithful wife Penelope, who has held off the advances of more than 100 suitors during her husband's absence.
Agamemnon's son Orestes, who avenged his father's death, is also held up as a contrast to Odysseus' son, Telemachus, who has yet to make a name for himself in the world. Orestes is praised for avenging his father's death and is thus used as an example for Telemachus to spur him on to accomplish great deeds. Thus, Athena says to Telemachus in Odyssey 1:
...use heart and mind to plan how to kill the Suitors in your palace, openly or by guile: since it is not right for you to follow childish ways, being no more a child. Perhaps you have not heard what fame Orestes won among men, destroying his father’s murderer, cunning Aegisthus, for killing his noble father? You too take courage, my friend, since I see you are tall and fine, so that many a man unborn will praise you. (A. S. Kline translation)