The Book of Ecclesiastes is traditionally attributed to King Solomon, based on the text's introduction of the speaker as "the son of David, king in Jerusalem" and Solomon's known wisdom, wealth, and reign. Jewish and Christian traditions widely accept Solomon as the author, with the view that he wrote this book in his old age, reflecting on the meaning of life and its vanities.
However, modern scholarship challenges this traditional attribution. The book contains Persian loanwords and Aramaic influences, suggesting a date of composition much later than Solomon's time, likely between 450 BCE and 180 BCE, during the Persian or Hellenistic periods. Some scholars propose that the author used Solomon's persona (Qoheleth) as a literary device rather than being Solomon himself. This has led to debates, with some considering the book a post-exilic wisdom literature rather than a direct work of Solomon.
In summary, while tradition credits King Solomon as the author of Ecclesiastes, critical scholarship leans towards a later authorship by an unknown writer using Solomon's identity symbolically.