The book of Proverbs, the book of Ecclesiastes, and the book of Job all make up the Old Testament wisdom literature, and together they teach us an important lesson about the meaning of life.
There are three books of the Bible that would later come to be called the "wisdom literature." They reveal the collected wisdom of generations of godly people and invite us to consider the complexity and simplicity of living wisely. These three books are the books of Proverbs, Job, and Ecclesiastes. Each of these books explores the same basic theme and tackles the same basic question.
In the book of Proverbs, we are given access to a perspective similar to that of a brilliant teacher, offering her insights on a wide range of subjects from relationships to wealth to spirituality. Proverbs shows us that there is an aspect of God, His wisdom, that can guide us through our lives. Proverbs personifies this wisdom as "lady wisdom" and attempts to show us that anyone can access this wisdom and make an incredible life for themselves out of the gifts that it freely offers, so long as they are careful to respect the source of this wisdom—God.
In Ecclesiastes, three different, relatively disturbing themes are explored, all of which attempt to show that this life, at least as we know and live it, is meaningless. First, the march of time—the idea that time progresses forward and eventually we are all forgotten. Second, we are all going to die. No matter what, no matter how moral we are, human beings are destined to die. Finally, is that life has a random nature. Sometimes misfortune strikes good, wise people, and sometimes fools are rewarded. However, all these dark themes are meant to portray a much brighter message.
Throughout the book of Job, we see Job and his friends wrestling with the question of why a God who is wise and just let such horrible things happen to an innocent man. It's a question that God Himself answers, though not in the direct way Job was expecting.
Instead, God takes Job on a virtual tour of the universe, giving him a tiny window into all the complexity of which God is in control. In doing this, God is showing Job that his suffering is just one tiny part of an infinitely large cosmic scheme that God is controlling through His wisdom.
Even though God's answer was more than satisfactory and even though Job was humbled by it, God still chose to restore all Job's blessings to him. Our problems are still important to God and that we should still trust Him to look over us. Together, all three of these wisdom books show us the meaning of life and what it means to live in the wisdom of God.