English Basic Explanation - Chapter 100
The opening verse of this Psalm identifies it as a "Mizmor Le'Toda," a song to be sung at the time of the "Toda" ("thanksgiving") offering (see Rashi). The Torah speaks of this Korban (sacrifice) in the Book of Vayikra (7:12), amidst its discussion of the "Shelamim" category of sacrifices, or sacrifices which are eaten in Jerusalem by the person who brings the offering. The Sages explain that a person would bring a "Toda" offering upon emerging from one of four life-threatening situations: imprisonment, grave illness, a sea voyage, or desert travel. The "Toda" offering was a particularly festive event, as it consisted of an animal as well as a variety of breads that were eaten as part of the celebration. What more, unlike most other "Shelamim" sacrifices, the "Toda" had to be eaten by the end of the night following the day of the offering (Vayikra 7:15). This ensured that the individual hosting the feast would invite many guests to take part in the celebration, thereby publicizing this expression of thanksgiving.
This Psalm, which accompanied the "Toda" offering, essentially underscores the importance of joy in the service of God. It famously declares, "Ivdu Et Hashem Be'simha" – "Serve God with joy" (verse 2) – instructing that we perform Misvot out of a genuine feeling of gratitude for God's having selected us as His special people (verse 3). In verse 4, the Psalmist exclaims, "Enter His gates with thanksgiving; His courtyards with praise!" The Levi'im singing this song exhort the individual bringing the offering to enter the Temple courtyard with joy, excitement and fervor. As much as the Bet Ha'mikdash is a site of awe and dread, intended to instill within the visitor a sense of God's greatness and the human being's unworthiness to stand in His presence, at the same time it serves as a source of joy and festivity. A person who feels grateful to God for helping him through a difficult period is bidden to come and celebrate with the Almighty, to exult and rejoice with not only friends and family, but also with God Himself, in His Mikdash. The singing of this Psalm is intended to remind the individual to rejoice and celebrate, to use this festive occasion as an opportunity to increase his love for the Almighty and appreciation of His infinite kindness (verse 5).