Human life is fragile and brief when compared to the eternal nature of the Creator. Facing the temporary reality of existence, a heartfelt plea arises asking God to respond to humanity with grace and shelter rather than strict punishment based on their actions.
The primary approach among commentators is that this prayer was authored by Moses. Tradition holds that King David later discovered it and included it in the Book of Psalms [רד״ק, מאירי, מצודת דוד]. It serves as the opening to a series of eleven psalms attributed to Moses, which correspond to the eleven blessings he gave the tribes of Israel just before his death [רש״י, מצודת דוד, מאירי]. Moses is referred to as a man of God, a title reflecting his supreme level as a prophet [רד״ק, מצודת דוד, מאירי]. While an alternative view suggests the prayer was composed by Levite descendants of Moses, this is generally set aside. The simpler understanding remains that Moses composed it himself, using plural language because he was a leader praying on behalf of his entire nation [אבן עזרא, מאירי]. Regarding when it was first spoken, one perspective suggests it was recited on the day the Tabernacle was erected, serving as a request for God's presence to rest upon the Israelites through His grace [אלשיך].
At the heart of this prayer is the recognition of God as a true dwelling place and refuge [רש״י, רד״ק, מצודת ציון, מלבי״ם, מצודת דוד]. He is compared to a strong, protective building that shields those inside from harsh floods and heavy rain [מצודת דוד]. This imagery reveals a profound reality: God is the place of the world, but the world is not His place. The physical skies above are not our actual home, as God alone serves as our exclusive shelter [רד״ק, אבן עזרא, ביאור שטיינזלץ].
On a spiritual level, God is the very source from which all souls are formed and the ultimate destination to which they will return. Before a person is born and after they pass away, their soul rests within this Divine source, which is its genuine home. Life in this world and physical death are merely temporary changes in location, while the core spiritual essence of the soul remains eternal, safely sheltered within God [מלבי״ם]. In a practical sense, especially during times of exile, this Divine shelter is found within synagogues and study halls, which serve as physical spaces for God's presence [תורה תמימה].
The enduring nature of this shelter highlights the vast difference between passing time and true eternity. Human beings are only brief guests in this world. As generations constantly come and go, the Divine dwelling remains entirely stable and unchanging [אבן עזרא, ביאור שטיינזלץ]. God provided this shelter in the past and will continue to do so in the future [מאירי], existing as a refuge even before the world was created [רש״י]. Throughout history, it is this exact grace that sustained the world through massive crises, such as the generations of the Flood and the Tower of Babel, and protected the Israelites during their bitter exile in Egypt [אלשיך].