This day marks what can arguably be called the greatest tragedy of all of Jewish history. Moshe Rabbenu had been on Har Sinai for forty days and was set to come down with the original Luchos - the Torah of Moshiach! By the grace of Hashem, the Jewish people, with Moshe's help, had succeeded in bringing down the light of Moshiach and returning to the state of Adam Harishon before the sin. They had extracted all the forces of holiness that had been entrapped by the Satan in the forces of Evil, which was embodied in Mitzrayim. At the last moment, the Satan came with a final trick, convinced the Jews that Moshe was dead, and that he would not return. This opened the door for the sin of the Golden Calf, which would return the poison of Evil back into mankind. Moshe had led the Jewish people to the chuppah, but as they stood underneath and were about to be wed to Hashem, as it were, they sinned the sin of adultery. The light of Moshiach that was embodied in the original luchos was shattered, and all the Jews watched in horror as the light, which had been etched into the stones, flew toward heaven, leaving nothing more than a lifeless shell - the broken tablets.
This tragedy is reflected in the later tragedies that occurred on this day - the burning of the Torah, the idol being placed in the Beis Hamikdash, the city of Jerusalem being breached, and the daily offering being stopped. All these are different representations of the loss we brought upon ourselves - the loss of the ultimate light that we wait for, and the infinite joy and closeness to Hashem that accompany it.
The passuk in Zechariah says כה אמר השם צבקות צום הרביעי וצום החמישי וצום השביעי וצום העשירי יהיה לבית יהודה לששון ולשמחה - the fast of the fourth month (Tammuz) and the fast of the fifth month (Av) and the fast of the seventh month (Tishrei) and the fast of the tenth month (teves) will be for the house of Yehuda for joy and gladness.
The classic question that is asked is that we understand that they will be days that are no longer sad, but why will they be joyous?
The answer is that these days are only sad because they represent opportunities lost. The 17th of Tammuz would have been the day of the consummation of our relationship with Hashem if we had not sinned with the Golden calf. But this does not mean that the potential for that relationship was completely lost. This day still holds within it that very light that did not end up being revealed. This day is still the fortieth day from Shavuos, and still represents the relationship that will one day indeed be made complete with the advent of Moshiach. Thus this day will be a day of incredible joy and gladness.
To illustrate this point a bit further, I would like to share a question that Rav Shimon Kessin asks. We find that Moshe Rabbenu himself is actually involved in the final process of Moshiach and of uniting the two Moshiachs together. The question is, Why? While we know that Moshe was Moshiach ben Yosef of his generation, there were many failed Moshiach ben Yosefs that existed in many different times, and we do not find that they are involved in the final process!
The answer is that while Moshe did not succeed in completing the 'marriage' between the Jewish people and Hashem, nevertheless, he did succeed in completing the first stage - the קידושין, as it were. The נישואין - the second stage - was prevented by the maaseh ha'egel, but he wasn't a failed Moshiach - he left the door open for the final Moshiach ben Yosef to complete the job that had already been started. This is why he returns to be involved in the final redemption process.
Thus we see that although the process of Moshiach seems to have been lost on this day, the truth is that it was just put on hold. But the completion of this process will still take place on the day that was destined for it, and then the days of fasting will be replaced with days of joy.