"And it came to pass [on that day], when Eli was laid down in his place, and his eyes began to wax dim, etc." (1 Samuel 3:2). From here the Sages said: anyone who raises up a wicked son or a wicked disciple, in the end his eyes grow dim. A wicked son — from Isaac: "And it came to pass, when Isaac was old, that his eyes were dim, so that he could not see" (Genesis 27:1). Why? Because he raised up Esau, a wicked son. A wicked disciple — from Ahijah the Shilonite: "But Ahijah could not see, for his eyes were set by reason of his age" (1 Kings 14:4). Why? Because he raised up Jeroboam, a wicked disciple.
Why the Eyes of Eli, Isaac, and Ahijah Grew Dim
Midrash Shmuel 8:8
ויהי (היום) [ביום ההוא] ועלי שוכב במקומו ועיניו החלו כהות וגו' (שמואל א' ג' ב), מיכן אמרו חכמים כל מי שהוא מעמיד בן רשע או תלמיד רשע סוף שעיניו כהות, בן רשע מיצחק, ויהי כי זקן יצחק ותכהינה עיניו מראות (בראשית כ"ז א'), למה שהעמיד עשו בן רשע, תלמיד רשע מאחיה השילוני, ואחיהו לא יכול לראות כי קמו עיניו משיבו (מלכים א' י"ד ד'), למה שהעמיד ירבעם תלמיד רשע.