"V'ra'ooh kol amei ha'aretz ki shem Hashem nikra alecha v'yra'ooh mimeka - and the nations of the land will see that the Name of Hashem will be upon you and they will fear you."(Devraim 28:10). Chazal (Menachos 35b) interpret this passuk as referring to the tefillin shel rosh which contain the Name of Hashem. The Rambam (Hilchos Tefillin 4:25) writes that wearing tefillin enables a person to become a yarei Shomayim - one who fears Hashem. What is unique about this mitzva that it is a catalyst for yiras Shomayim for both the one who wears tefillin and for the one who sees the tefillin being worn?
There are several halachos that pertain to tefillin that may help us understand the relationship between tefillin and yiras Shomayim. Hilchos Tefillin contains includes details that resemble halachos relating to the Beis Hamikdash. Unlike other objects used for mitzva purposes such as tzitzis or a lulav, tefillin have kedusha similar to objects used in the Beis Hamikdash and cannot simply be discarded when no longer usable. Tefillin must be made from the parts of a kosher animal, and this halacha also governed the construction of the Mishkan (see Shabbos 28a), whereas concerning other mitzvos this may not apply (See Ran in Rosh Hashana 6a on the Rif for why shofar may also be included in this rule). The Rosh in (Hilchos Tefillin siman 18) derives the halacha that one cannot have a separation between one's body and the tefillin from the halacha that invalidates such a separation between the clothing worn by the kohein in the Beis Hamikdash and the body of the kohein. The requirements to concentrate on tefillin while they are worn is derived from a similar obligation incumbent upon the kohein gadol when he wears the tzitz - the ornament worn by the kohein gadol which has Hashem's Name engraved on it (see Yoma 7b).
Even the shape of the tefillin indicates a connection to the Beis Hamikdash, as both Tefillin and the mizbeach in the Beis Hamikdash must be square. Not only do the halachos that govern tefillin highlight the similarities between tefillin and the Beis Hamikdash, but the very name given to part of the tefillin reinforces this connection. The box of the tefillin which enclose the parshiyos is called a bayis- a house. The imagery of a house built around the words of Torah is clearly reminiscent of the Mishkan and later the Beis Hamikdash constructed around the aron hakodesh which contained the words of Torah inscribed on the luchos.
It is this component of mikdash that endows the tefillin with the ability to instill yiras Shamayim. The Beis Hamikdash is a place of awe. Yaakov Avinu, upon realizing that he had slept in the makom hamikdash declared, "ma norah hamakom hazeh - How awe inspiring is this place." The halacha obligates us to be a in a state of mora - awe upon entering the Beis Hamikdash. Similarly as we wear our bayis of kedusha - our tefillin - we and all those around us should be inspired by the awe of Hashem's words that we carry with us.
In the Parsha of "v'haya im shamo'ah" the mitzva of tefillin is written immediately following the pesukim that describe our being exiled from Eretz Yisrael. The Torah is teaching us that even in galus in the absence of the real Beis Hamikdash we still have our batim of tefillin. This special role tefillin have specifically at a time of churban is highlighted by our practice of wearing tefillin during Mincha on Tisha B'Av. After having spent the entire morning focusing on the destruction of the Beis Hamikdash, the first mitzvah that we perform to begin the process of comfort is putting on our tefillin. We realize that even in galus we can still attain yiras Shomayim by learning the lesson of tefillin. As we come close to the end of the seven weeks of comfort following Tisha B'Av, we turn to the parshiyos and the batim of our tefillin. May we merit attaining the yiras Shomayim they can induce, thereby meriting the construction of the ultimate bayis which will once again house the words of Hashem.