Surprisingly few of the world’s great philosophers have directly addressed this question.
Instead they have focused on a subtly different question: what does it mean to live well?
In his Nicomachean Ethics – Aristotle emphasised the need to cultivate good character – finding the sweet spot between harmful extremes.
For example generosity lies between the extremes of meanness and profligacy – courage between cowardice and rashness.
A remarkably similar vision is presented in the Chinese classics The Analects of Confucius and Mencius.
However in the west millennia of Christian dominance created the assumption that life needed some justification outside of itself.
As religious belief waned the question of whether life is worth living emerged as a central concern for the French existentialists of the 20th century.
The gist of their answer was hardly inspiring: life is absurd so you’ve just got to get on with it and create your own meaning.
More recently anglophone philosophers have offered more positive answers by pulling together threads in their tradition that have previously been separate.
Two fine examples of this are Robert Nozick’s The Examined Life and Christopher Belshaw’s 10 Good Questions About Life and Death.