One of the purposes of the Psalms is to show us the desires that God wants to create in our hearts. We read and sing the psalms not only to learn truth about God, but to see how God wants us to respond to his truth.
Psalm 122:1 shows us that the old covenant believer desired to worship the Lord together with other believers. He was glad when someone told him that they must go to the house of the Lord. Even if it meant a long and dangerous journey, he was eager to be in the presence of the Lord together with fellow believers.
Old covenant believers had to go to the temple in Jerusalem in order to meet with God. Even then, they could not approach the Holy of Holies or even offer their sacrifices themselves. They had to remain at a distance. Nonetheless, they still enjoyed real fellowship with God.
New covenant believers rejoice that we do not have to go to a temple to meet with God; we can go to the person of Jesus Christ. He is our great high priest who has opened a way to God through his blood (Hebrews 10:19–25).
Just as God the Holy Spirit created a desire for worship and fellowship in the hearts of old covenant believers, God the Holy Spirit does the same for Christians today (Galatians 5:25). That is why we are encouraged in Hebrews 10:24–25: Let us consider how we may spur one another on toward love and good deeds, not giving up meeting together, as some are in the habit of doing, but encouraging one another.
1 I was glad when they said to me, “Let us go to the house of the LORD!”