Hanukkah is one of the few Jewish holidays not mentioned in the Bible. The story of how Hanukkah came to be is contained in the books of 1 and 2 Maccabees, which are not part of the Jewish canon of the Hebrew Bible.
These books tell the story of the Maccabees, a small band of Jewish fighters who liberated the Land of Israel from the Syrian Greeks who occupied it. Under the reign of Antiochus IV Epiphanes, the Syrian Greeks sought to impose their Hellenistic culture, which many Jews found attractive. By 167 B.C.E, Antiochus intensified his campaign by defiling the Temple in Jerusalem and banning Jewish practice. The Maccabees--led by the five sons of the priest Mattathias, especially Judah--waged a three-year campaign that culminated in the cleaning and rededication of the Temple.
Since they were unable to celebrate the holiday of Sukkot at its proper time in early autumn, the victorious Maccabees decided that Sukkot should be celebrated once they rededicated the Temple, which they did on the 25th of the month of Kislev in the year 164 B.C.E. Since Sukkot lasts seven days, this became the timeframe adopted for Hanukkah.
About 250 years after these events, the first-century Jewish historian Flavius Josephus wrote his account of the origins of the holiday. Josephus referred to the holiday as the Festival of Lights and not as Hanukkah. Josephus seems to be connecting the newfound liberty that resulted from the events with the image of light, and the holiday still is often referred to by the title Josephus gave it.