Song of Songs during Passover
Ruth during Shavuot (Pentecost)
Lamentations at the Ninth of Av
Esther at Purim
Qoheleth during Sukkot (Booths)
There is a fairly clear relationship between each book and its holiday. Esther, of course, describes the origins of Purim. Lamentations works well on a day commemorating the two destructions of the Jerusalem Temple (by the Babylonians and by the Romans). The story of Ruth takes place during the Barley harvest (Ruth 1:22), which would correspond to the time of Shavuot. Song of Songs traditionally receives an allegorical interpretation according to which it recounts God's love for Israel, especially as displayed in the exodus from Egypt, thus befitting Passover.
However, there is not an obvious relationship between Qoheleth and Sukkot, and I don't believe there's any traditional interpretation for the relationship. It's been a few years since I tried to gather opinions on this issue, and now I can't find my notes on it. So, I thought I'd start collecting some opinions here.
First, Wikipedia's article on Ecclesiastes says this (under "Traditional Judaism"):
It is read on Sukkot as a reminder to not get too caught up in the festivities of the holiday, as well as to carry over the happiness of sukkot to the rest of the year by telling the listeners that without God, life is meaningless.Marvin Sweeney's new book Tanak: A Theological and Critical Introduction to the Jewish Bible (Fortress, 2012) contains these thoughts:
Qoheleth is read on Sukkot to explore the transitory nature of human life while affirming commitment to G-d. (p. 24)
Because the book of Qoheleth reflects on the transitory nature of life, it is associated with the festival named after the transitory life that Israel led at the concluding harvest during the wilderness wanderings. (p. 438)Neither Sweeney nor the Wikipedia article cites any ancient or medieval Jewish authority for these opinions. That corresponds to what I recall from the last time I looked at this issue.
I'm not going to look further right now, but at some point I might add to this post with further opinions.
One more thing: there's also the issue of when the Five Megilloth became connected to the festivals, and when they were grouped together as a subsection within the Ketuvim in our manuscripts. As I recall, there are different answers to this as well. I think some scholars believe that the liturgical connection to the holidays came first, and they were subsequently grouped together in the manuscripts to reflect their use at festivals. Other scholars argue or assume the opposite, that they were grouped together in the manuscripts first, and this became a reason to associate all five of the Megilloth with particular holidays, especially once 2 or 3 of the Megilloth became associated with their own holiday. This would offer a particularly nice explanation for how Qoheleth became associated with Sukkot (not a suggestion original with me).