This description of the Book of Ecclesiastes is from Easton's Bible Dictionary.
"Ecclesiastes : the Greek rendering of the Hebrew Koheleth, which means "Preacher." The old and traditional view of the authorship of this book attributes it to Solomon. This view can be satisfactorily maintained, though others date it from the Captivity. The writer represents himself implicitly as Solomon (Eccl 1:12). It has been appropriately styled The Confession of King Solomon. "The writer is a man who has sinned in giving way to selfishness and sensuality, who has paid the penalty of that sin in satiety and weariness of life, but who has through all this been under the discipline of a divine education, and has learned from it the lesson which God meant to teach him." "The writer concludes by pointing out that the secret of a true life is that a man should consecrate the vigor of his youth to God." The key-note of the book is sounded in Eccl 1:2.
"Vanity of vanities! saith the Preacher, Vanity of vanities! all is vanity!"
i.e., all man's efforts to find happiness apart from God are without result."
Information about the writer of Ecclesiastes, King Solomon, from Easton's Bible Dictionary:
Solomon: peaceful, (Heb. Shelomoh), David's second son by Bathsheba, i.e., the first after their legal marriage (2 Samuel 12:1-31). He was probably born about B.C. 1035 (1 Chronicles 22:5; 29:1). He succeeded his father on the throne in early manhood, probably about sixteen or eighteen years of age. Nathan, to whom his education was intrusted, called him Jedidiah, i.e., "beloved of the Lord" (2 Samuel 12:24,25). He was the first king of Israel "born in the purple." His father chose him as his successor, passing over the claims of his elder sons: "Assuredly Solomon my son shall reign after me." His history is recorded in 1 Kings 1:1 - 11:43 and 2 Chronicles 1:1 - 9:29. His elevation to the throne took place before his father's death, and was hastened on mainly by Nathan and Bathsheba, in consequence of the rebellion of Adonijah (1 Kings 1:5-40). During his long reign of forty years the Hebrew monarchy gained its highest splendour. This period has well been called the "Augustan age" of the Jewish annals. The first half of his reign was, however, by far the brighter and more prosperous; the latter half was clouded by the idolatries into which he fell, mainly from his heathen intermarriages 1 Kings 11:1-8; 14:21,31).
Continue reading about King Solomon from Easton's Bible Dictionary.