This is a type of the Zion songs that sing of the glories of God's protective presence in the temple; it is similar to some of the songs of ascents that pilgrims sing as they journey to the temple for festival worship.
The pray-er longs to be at the temple--where God has promised to be present for the people and where he or she can join in the celebration of the worshiping community (vv. 1-4). In lovely poetic language, the psalm envies the sparrows and swallows that can fly in and out of the open temple daily and even nest there permanently.
The Old Testament has no notion of a pilgrimage that is interested only in the goal (the temple) and not in the journey and the surrounding world. Yes, the poet longs for the temple, but he or she also recounts how the pilgrims transform the valleys through which they travel (vv. 5-7). The earth itself has reason to give thanks for God's people--a far cry from the idea sometimes heard that dominion over the earth means that humans are free to exploit and use up its resources at will.
1 How lovely is your dwelling place,
O Lord of hosts!
2 My soul longs, indeed it faints
for the courts of the Lord;
my heart and my flesh sing for joy
to the living God.
3 Even the sparrow finds a home,
and the swallow a nest for herself,
where she may lay her young,
at your altars, O Lord of hosts,
my King and my God.
4 Happy are those who live in your house,
ever singing your praise.
5 Happy are those whose strength is in you,
in whose heart are the highways to Zion.*
6 As they go through the valley of Baca
they make it a place of springs;
the early rain also covers it with pools.
7 They go from strength to strength;
the God of gods will be seen in Zion.
New Revised Standard Version Bible: Anglicized Edition, copyright © 1989, 1995 National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved worldwide. http://nrsvbibles.org