Praying Near Windows(Masechet Berachot Daf לד: Perek 5 Siman 124)
(condensed from Ein Ayah, Berachot 5:124)
Gemara: Rabbi Chiya bar Abba said in the name of Rabbi Yochanan: A person should pray only in a house that has windows, as the pasuk says, “And there were windows opened in the attic opposite Yerushalayim” (Daniel 6:11).
Ein Ayah: It is true that prayer is a service of Hashem that impacts internally on the spirit of a person. However, there is a condition for prayer to have its full impact on the one who prays, and that is that he is fully aware of the value of the outside world. In that way, he will effectively improve both himself and others around him. In contrast, one whose personal service of Hashem makes him separate himself from the world around him will not be improved to the desired degree by the prayer. This is because prayer is supposed to give him the energy to be ready to act in the spirit of and be affected by the justice and straightness of the spirit of Hashem that arouses him.
That is why one should pray in a house where there are windows, so that the ability to look outside reminds him of his obligation to the whole world in which he lives. However, one is supposed to make use of the external world in the context of the true good fortune, which is general peace and true knowledge, and these are engendered in Yerushalayim, from where Torah goes out to the world. That is why Daniel wrote about the window open in the direction of Yerushalayim.