Many answers are given to this question – from the practical to the mystical. During the fifty day period from the departure from Egypt to the day the Jewish people received the Torah at Sinai certain laws were already being given. Among these were the laws of kashrut. Since this was such a new and complex subject, especially the separation between meat and milk dishes, the people decided to keep things simple and just eat milk products at the time of Shavuot.
Dairy foods are in general white, the color most associated with spirituality and pureness. Eating dairy foods reminds us of the three days of preparation before Shavuot when all the people purified themselves in order to be fitting vessels to receive the Torah. White also reminds us of the angelic beings who came and placed crowns on their heads as a reward for saying “we will do [follow the laws of the Torah] and then we will hear [seek to understand].
The land of Israel is called “a land flowing with milk and honey.” Since the objective was to take the newly received Torah directly into Israel and establish a society based on Torah principles in the land promised to the Jewish people, therefore we eat milk products to remind us of our ultimate goal as a people.
Cheesecake and other traditional Shavuot recipes for milk products are sweet, thus reminding us of the sweetness of the Torah. A similar custom is to give cookies in the shape of letters to children upon first learning the Hebrew letters.
Another reason relates to the numeric value of the Hebrew word for “milk” which is forty. This reminds us of the forty days Moses spent on Mt. Sinai when he received both the written and the oral Torah.