The Book of Ecclesiastes does not directly identify its author. There are quite a few verses that imply Solomon wrote this book. There are some clues in the context that may suggest a different person wrote the book after Solomon’s death. Still, the conventional belief is that the author is indeed Solomon.
Some don't understand the Book of Ecclesiastes at all. At first it appears that the author is all depressed and down about life and he writes some pretty strong language so that if we we're not careful we would think that all of life, truly is futile, but that's not his message. He is only starting out pondering about life. Later on, he goes on to conclude that the key to life is not in life itself. Pleasure, materialism, wisdom, and money are all futile and folly. True happiness comes from centering our lives on God, not ourselves. He wanted to teach people about the importance of wisdom, and acknowledging that seeking truth and wisdom apart from God is futile.