The connections between the holidays of Chanukah and Sukkot deserve a special look. Let us investigate the element of simcha (joy).
The Torah highlights the element of simcha on Sukkot (Devarim 16:14). The main basis for simcha relates to the physical bounty of the agricultural year in Israel, which finishes on Sukkot. The joy cannot be complete without sharing the bounty with the needy in society. To ensure this, the Torah commands the farmer to follow the laws of ma’asrot (tithes). These benefit: 1) The kohen and levi, who invest their time in the nation’s spiritual needs and are excluded from the "competition" for economic success; 2) The poor, who fare poorly in their economic efforts. 3) The disadvantaged (the foreigner, the widow, and the orphan). After each small cycle of ma’asrot (3 years) the laws known as biur ma’asrot are employed to check if the giver administered his donations properly.
When is this check carried out? The Yerushalmi had a thought that it might be appropriate on Chanukah. Although the idea is rejected, the possibility alone seems strange considering that Chanukah is rabbinic and the laws of viduy ma’aser are from the Torah. Apparently, in addition to the holiday as we know it, Chanukah marks the completion of the final stages of harvesting. Therefore, there is an element of thanking Hashem for physical success on Chanukah as well.
Sukkot is also a time for spiritual simcha, at the close of the period of repentance. This simcha finds expression in the simchat beit hasho’eva celebration in the Beit Hamikdash. As part of the celebration, jugs of olive oil were brought, which flooded the Temple and Jerusalem as a whole with light (mishna, Sukka 5: 2-3), along with dancing with torches. Additionally, the festivities’ quality had a spiritual element powerful enough to bring prophecy to those who had not previously experienced it (Yerushalmi 5:1).
The Shulchan Aruch (Orach Chayim 670:2) says that festive meals on Chanukah are elective. The Rama adds that some say that there is an element of mitzvah to such meals because of the consecration of the altar. The Mishna Berura (ad loc.:6) explains the difference between Chanukah and Purim in this regard. Chanukah celebrates salvation from spiritual danger and, therefore, we celebrate spiritually by lighting candles. Purim celebrates salvation from death and, therefore, includes festive meals.
After seeing the two elements of Sukkot and the connection between Sukkot and Chanukah, we can make the following claim. While lighting spiritual lights, we use olive oil also in order to incorporate an element of thanks for their harvest as well, which, in the Hasmonaean times, became possible because of victory in battle. The lighting itself represents the victory over the darkness of Greek idolatry. In our times, we have merited to celebrate and thank Hashem for both spiritual and nationalistic Divine gifts.