Why did he hate life?
Rashi: He had prophecy about the generation of Rechav'am; they were Resha'im.
Ibn Ezra: "Chayim" can be a plural adjective - "Chayim Kulchem ha'Yom" (Devarim 4:4). It can be a noun - "Maves v'Chayim" (Mishlei 18:21). There is no singular form of the noun, just like "Ne'urim" (Yeshayah 54:6), "Zekunim" (Bereishis 37:3), Shelamim 1 , Milu'im and many others; here it is a noun.
Rashbam: I hate the life that Hashem gave to me 2 , for I see in my length of days 3 that all is Hevel.
Seforno: When I saw that we have something that does not perish, I hated all my involvement in temporary life, which is Tachas ha'Shamesh (perishes); it is Hevel.
Metzudas David: I hate that I am still alive.
Magihah (in Toras Chayim): Perhaps the text should say 'Alumim' in place of Shelamim. Some question also Ne'urim and Zekunim. (Why did he not bring 'Mayim'? - PF)
Rashbam: It is one of three things that He gave to me. Magihah (in Toras Chayim) - the others are wealth and Chachmah.
Shlomo lived only 52 years! Since he hated life, it seemed like a long time. (PF)
Why does it say "Ra Alai ha'Ma'aseh?"?
Metzudas David: It is not straight in my eyes.
Why is everything "Hevel u'Re'us Ru'ach"?
Metzudas David: There is no benefit, and the spirit is broken, for no act fulfills the desire and intent of the doer.