This psalm was intended to be sung during the Feast of Booths or Tabernacles, which reminded the Israelites of God's law. The psalm calls the Israelites to joyful worship of God, their strength, through music and instruments. It then relays a message from God, pleading with the Israelites to listen to Him and obey His commandments to avoid foreign gods. God promises blessings like protection from enemies and food if the Israelites obey Him, but notes they did not listen in the past.