The gemara (A.Z. 3) writes that in the future the aku"m will complain to Hashem that it's not fair for us to receive all the reward for Torah because, they will claim, had they received the Torah they would have fulfilled it as well. Hashem will respond by giving them a chance to prove themselves -- he will give them the mitzvah of sukkah. The gemara says that the aku"m will run out and build sukkos on their roofs to do the mitzvah, but Hashem will then bring out the sun like on a nice hot summer day. The aku"m won't just leave their sukkos because of the heat, but they will also kick the sukkah and show their disgust, proving that they have no real commitment.
Why of all the mitzvos did Hashem give the aku"m specifically the mitzvah of sukkah as a test? Why not Shabbos? OK, so maybe that's too hard a test (the gemara calls sukkah a "mitzvah kalah," an easy one to do). But their are other easy ones. We just did the mitzvah of eating on erev Yom Kippur -- what could be easier than that? Why not tefilah -- that's one everyone can relate to? Why davka sukkah?
The Maharal explains that the whole idea of Torah and mitzvos is to get a person to move outside the box the physical, material world would put him in. A person's home is his natural habitat so to speak. It's his comfort zone. We all know the expression, "There's no place like home." When the aku"m come and say they want to try out Torah, Hashem gives them the mitzvah of sukkah because this mitzvah in particular demonstrates the willingness to leave our natural comfort zone, to leave where "teva" tells us we belong, to leave the habits and mindset that nature programmed into us, and give all that up for the sake of G-d. The aku"m are trapped by the constraints of teva and can't give it all up, but we are able to. Therefore, we alone deserve Torah, because that is what Torah is all about.
Of all the days that the sun has to come out with broiling heat, does it have to come out on the very day the aku"m build their sukkos? Yes, this is part of the test to see if the aku"m will keep the mitzvah, but Hashem could just as well test them by making it rain a little, but bringing out some bugs, etc. R' Bumim m'Peshischa explains that the sun here is the tremendous light of the mitzvah of sukkah itself! That light is so covered up in this world that we might miss it, but in the future, Hashem will bring out that light of the mitzvah of sukkah for everyone to see. The aku"m may be able to build little huts, but then when Hashem will show them what the mitzvah is really about, they can't measure up.
The gemara says that when the aku"m kick down the sukkah they will recite the pasuk, "N'natka es mosroseimo v'nashlicha mi'menu avoseimu," (Tehillim 2:3) let us will rip off our ropes and bonds. The Maharasha explains that the ropes are the ropes used to tie down the sukkah walls, the bonds, "avos," are like "anaf eitz avos," hadasim plants, that were used as schach. The Sefas Emes, however, explains that the bonds the pasuk is speaking of are metaphorical -- sukkah is a bond between us and G-d; sukkah proves that what happens down here is connected by a long rope with whatever goes on upstairs (and vice versa).