When the Jewish people prepared for the 'giving of the Torah' at Mount Sinai, today celebrated as Shavuot, they were preparing for the revelation of Hashem speaking directly to every Jewish person. Hashem was due to relate all of the Ten Commandments to the people however due to their inability to withstand His voice, Moshe took over for the last eight.
At Sinai, the Jewish people accepted the concept of the Torah and made a covenant with Hashem, as well as having a celebration to mark the occasion. Not all mitzvot had been given and many stories we find in the Torah had not taken place at this point - but that does not affect the events we celebrate as Shavuot, which are a key turning point in our history.
After the revelation, Moshe was then summoned to the top of the mountain to receive more laws and to write the two Luchot (tablets) of stone, containing the Ten Commandments. During this time, the Jewish people, who were being led by Aharon and Chur, grow anxious at Moshe's length of stay on the mountain and make a Golden Calf, which was worshipped on a festival they declared for themselves on 17th Tammuz. On this day, Moshe was already due to return from the mountain and upon seeing the celebrations, proceeded to smash the Luchot in public, an act which met with Hashem's approval. This is the root of the fast day on 17th Tammuz.
Following this incident, Moshe returns to the top of the mountain to pray for forgiveness for the Jewish people for another 40 days, returning on 29th Av. On 1st Elul he then returned to the mountain again for a third set of 40 days to re-write the Luchot a second time. On 10th Tishrei Moshe brought the Second Luchot down and the Jewish people had atoned for their earlier sin. This date is now celebrated as Yom Kippur, a day where the Jewish people gain atonement for all sins.
After a summer that had not gone to plan, the Jewish people then went to work on building a home for Hashem in the desert - the Mishkan - which is one of the reasons why we celebrate the festival of Sukkot. Sukkot is the last in the series of biblical festivals and we can now see a clear historical linkage connecting it with the first festival, Pesach.
Each year as we celebrate or commemorate Pesach, Shavuot, 17th Tammuz, Yom Kippur and Sukkot we are reliving the momentous events of the first year of freedom for the Jewish people. It is important to not just see these festivals as merely marking an individual event but to appreciate how they fit together in the wider context of Jewish history.