Waiting for Godot does not exactly question the meaninglessness of life. Rather, it represents or portrays the meaninglessness of life. If you start with the assumption that life is indeed meaningless, then how can you write a play that has meaning? Beckett evidently decided to write a meaningless play in order to parallel the meaninglessness of life. Ever since it was first produced, people have been asking, "What does it mean?" "Who is Godot?" and other such questions. The fact that the viewer struggles to understand the "meaning" of the play is what makes it absurb and comical. It has no meaning. It is life itself, and life itself, at least according to Beckett, has no meaning.
Shakespeare wrote long ago that life is meaningless. Here is a quotation from his most nihilistic play, Macbeth:
To-morrow, and to-morrow, and to-morrow,
Creeps in this petty pace from day to day
To the last syllable of recorded time,
And all our yesterdays have lighted fools
The way to dusty death. Out, out, brief candle!
Life's but a walking shadow, a poor player
That struts and frets his hour upon the stage
And then is heard no more: it is a tale
Told by an idiot, full of sound and fury,
Signifying nothing. (V.5)
Here is a pertinent quotation from Hamlet:
suit the action to the word, the word to the action--with this special observance, that you o'erstep not the modesty of nature: for any thing so o'erdone is from the purpose of playing, whose end, both at the first and now, was and is, to hold, as 'twere, the mirror up to nature; to show virtue her own feature, scorn her own image, and the very age and body of the time his form and pressure. (III.2)
Beckett is holding the mirror up to nature, showing his audience what life looks like in the modern world. Older writers, including Shakespeare himself, must have believed that life had meaning, regardless of whether or not they were able to discover what that meaning was. Their belief was typically based on faith in God, and many people began losing religious faith with the combined enlightenment and disillusionment of modern science.
Accordinig to the Introduction to Waiting for Godot in the eNotes Study Guide (see reference link below):
"Absurdist Theatre" discards traditional plot, characters, and action to assault its audience with a disorienting experience. Characters often engage in seemingly meaningless dialogue or activities, and, as a result, the audience senses what it is like to live in a universe that doesn't "make sense." Beckett and others who adopted this style felt that this disoriented feeling was a more honest response to the post World War II world than the traditional belief in a rationally ordered universe. Waiting for Godot remains the most famous example of this form of drama.
Some playwrights, novelists, and short story writers have declined to accept responsibility for explaining the "meaning of life" to viewers and readers, since these writers are intrigued with the possibilities of depicting human life without any purpose or meaning. Beckett is showing the members of his audience themselves. Like his two tramps, they are all waiting for something. At least Estragon and Vladimir know what they are waiting for. They are waiting for Godot. Beckett seems to be asking: "Who, or what, are you waiting for?"
Alexander Pope expressed a similar notion in An Essay on Man [1733-1734]:
Hope springs eternal in the human breast:
Man never is, but always to be blest.