The Shulchan Aruch tells us, “Those who are careful to wear a tallis katan should don it and lay tefillin at home, and then wallk, wearing tzitzis and crowned with tefillin, to the synagogue and there wrap himself in a tallis gadol” (O.C. 25, 2).
The reason is that the Zohar says it is a mitzvah to leave your home already wearing tzitzis and tefillin. Therefore, if you do not wear a tallis katan, you should put on your tallis gadol at home.
The Rema emends the practice brought in the Shulchan Aruch, saying that the prevailing custom is to put on your tallis gadol at home before laying tefillin, even if you are already wearing a tallis katan.
The Mishnah Berurah (s.v. 10) notes that if there are non-Jews passing in the streets you can hold off wrapping yourself in the tallis gadol until you reach the synagogue courtyard, and put it on there.
In Israel the practice of wearing tallis and tefillin on the way to shul is fairly common. Many years ago I was in Morristown, NJ for Shabbos and asked a local whether it would be okay to walkt to shul the next day wearing tallis and tefillin.
This halacha always seemed to be a remnant from centuries past, but in light of rising anti-Semitism in various parts of the world, unfortunately this halacha has become much easier to understand. For example, I would certainly be wary about wearing tallis and tefillin walking in most parts of Paris, London, Amsterdam, Stockholm, Copenhagen and other European cities.
Just this week two days ago a young Arab stabbed two elderly Jews walking home from shul on Shabbos, presumable while wearing talleisim.
And I noticed that in this vile video encouraging young Arabs to become “heroes” by stabbing Jews, the second victim was clearly identified as a worthy target by his tallis.