The Festivals listed in Exodus 23 are referenced to the agricultural season in which they occur. Natural processes in this world reflect a spiritual process. We are commanded to elevate and sanctify our natural instincts by celebrating the Festivals.
Pesach falls in the spring, when nature reawakens. Shavuot is the 'Harvest Festival' in which we mark the wheat harvest. Sukkot is the 'Festival of Gathering' when all produce is brought in from the fields. At these times it's only natural that a person will be happy. The natural reawakening in the spring, the abundance at harvest time and the variety of fruits gathered in the fall are certainly reasons to be happy. We are commanded to elevate and sanctify our natural instincts by celebrating the Festivals.
Natural processes in this world reflect a spiritual process. Pesach is a time of renewal and therefore we left Egypt and became a nation in the beginning of spring. Shavuot is a time when crops mature to full growth, and so the process that started at Pesach reached a culmination on Shavuot when we were given the Torah at Sinai. The joy we feel during Sukkot is due to all the physical bounty we have gathered, so it is the time to celebrate the Divine Presence that dwells amongst us and which is the source of all our blessings.
Thus each one of the Festivals symbolizes the completion of both physical and spiritual processes.
We are commanded to go up on pilgrimage to Jerusalem three times a year during the Festivals, offer sacrifices and be happy before God. In this way the agricultural and spiritual are joined together in one celebration.
The Festivals are also Days of Judgment as recorded in the first Mishna of Rosh Hashana. By keeping the commandments of the Festivals, we will be judged favorably. We are commanded to thank Him joyfully at every season and thus ensure His continued blessing from one season to the next.