The Midrash (rabbinic interpretation) tells us something very powerful about an individual who takes upon themselves to maintain their level of holiness and spirituality, and how that affects even those around them. Listen to the following Midrash. Rav Huna, in the name of Rav Chiya bar Abba, said: When Sarah, our matriarch, the wife of Abraham, came down to Egypt, Abraham realized how beautiful she was. As they were traveling, the verse in Parashat Lech Lecha tells us that Abraham noticed how beautiful his wife Sarah was. There are different interpretations. The interpretation I like to give is that since they were traveling—and when someone travels, especially back in the day—their beauty and how put together they were may be compromised. However, Sarah Imeinu (our matriarch) stayed beautiful the whole way. She was definitely a beautiful woman, not only spiritually and meaningfully, but physically as well. When she came down to Egypt, she was very careful to guard herself from being seen by anyone as much as possible and from attracting any attention—unnecessary attention—to herself. She guarded herself from any promiscuity or immorality. Because of that, all the women in Egypt at that time also made changes in their own lives, guarded their own dignity and the way they dressed, and stayed away from any illicit relationships and promiscuity, just in the merit of Sarah. She had that effect on those around her.
The Midrash continues and says that Yosef also came down to Egypt, as we know, 22 years before the rest of his family, and he also guarded himself from any improper relationships. Because Yosef overcame the temptation of the wife of Potiphar, guarding himself in matters of promiscuity and immorality, the Jewish people also came down. When they came down and immigrated to Egypt, they too guarded themselves from those very same immoral acts. The Midrash concludes: “Great was it that Yosef guarded himself from immorality because it was in his very merit that the Jewish people were eventually redeemed and taken out of Egypt.”
Rav Tzadok mi-Lublin explains that it is not for granted—don't take it as a chance or a fluke, for that matter—that the Jewish people were exiled to Egypt. Egypt was the most immoral place the world has ever seen. It was known for immorality, promiscuity, and all horrible things. The reason the Jewish people were sent there was so that they could be differentiated from the rest of the world, so that it would be obvious that the Jews were not the same as the Egyptians, all because of the merit of Yosef coming down and overcoming his temptation.
The Shem MiShmuel says that in the future, we know, we will have Mashiach ben Yosef, and Mashiach ben Yosef will be the one who wins the final wars of Gog and Magog. As the Zohar explains, there are going to be four different kings and kingships—kingdoms, rather—and they are all going to fight and lose at the hands of Mashiach ben Yosef. The Shem MiShmuel explains that the reason for this is that Yosef and the descendants of Yosef all have the power of Shemirat HaBrit, of guarding their Brit, guarding their covenant with God. That is what gives them and the rest of Israel the strength to overcome the wars of Gog and Magog and eventually bring the Mashiach.
The Taharat HaKodesh quotes a Pasuk (verse) in Iyov. It's two Pesukim. It's in chapter 22, at the end of Pasuk 29 and the beginning of Pasuk 30. It says: “That he, referring to Hashem, will save one who lowers his eyes; he shall deliver one who is not innocent.” The Taharat HaKodesh explains that from this verse—from these verses—we learn that a person is supposed to walk looking down. Meaning, they're not supposed to be looking for things that are inappropriate, whether it be other people walking, whether it be, God forbid, billboards, or anything of the sort. A person should guard their eyes by looking down. And why? Look at the continuation, that other part of the Pasuk: Yemalet i naki, that Hashem will deliver one who is not innocent. Does that make any sense, to give merit to someone else who is not innocent? From here, the Taharat HaKodesh says, we see that when a person guards their own eyes, not only do they bring merit upon themselves, they even bring merit upon those who may not always guard their own eyes. The power that a person draws when they overcome the temptation of looking at something inappropriate also gives power and merit to those who may unfortunately fall and not guard their own eyes.
To end off, the Ramchal, Rav Moshe Chaim Luzzatto, reminds us in Ma'amar HaIkarim that just as a person individually has the potential and power to guard their own eyes—the power either to draw themselves toward holiness or toward the opposite, impurity—so too, one individual, each and every individual, has that same power to draw all of creation and all of Am Yisrael, unfortunately, either toward impurity or toward purity. We can do so by the way we guard our eyes.
I'll end by saying that I remember one of my Rebbes (religious mentors) in yeshiva said the following: When it comes to controlling one's eyes, it's not so easy. However, he gave the following example. He said that when a person walks, he should never walk looking straight ahead. Of course, when you drive, you need to always be safe, and when you walk, you need to be safe. But ideally, an individual should either be looking down, so again, they don't see anything improper, and it's a form of humility, or they should be looking up, trying to connect to HaKadosh Baruch Hu (the Holy One, Blessed be He), looking up to the sky, which in itself brings fear of heaven. May HaShem bless us to guard our eyes and bring that amazing power of the redemption, the Ge'ulah, to come, that final one, B'ezrat Hashem, with Mashiach, and also allow all these amazing powers of spiritual growth to affect not only us in our efforts to guard our eyes, but all of Klal Yisrael in their efforts to guard their eyes. Amen ve'amen.