Victor Reppert already provided one place where C.S. Lewis talked about his atheism (before he became first an Idealist, then Pantheist, Theist, and finally a Christian). Because a commenter asked for others, I thought I would provide one. This is from the Introduction to Lewis's The Problem of Pain, p.13:
"Not many years ago when I was an atheist, if anyone had asked me, 'Why do you not believe in God?' my reply would have run something like this: 'Look at the universe we live in. By far the greatest part of it consists of empty space, completely dark and unimaginably cold. The bodies which move in this space are so few and so small in comparison with the space itself that even if every one of them were known to be crowded as full as it could hold with perfectly happy creatures, it would still be difficult to believe that life and happiness were more than a by-product to the power that made the universe. As it is, however, the scientists think it likely that very few of the suns of space -- perhaps none of them except our own -- have any planets; and in our own system it is improbable that any planet except the Earth sustains life. And Earth herself existed without life for millions of years and may exist for millions more when life has left her. And what is it like while it lasts? It is so arranged that all the forms of it can live only by preying upon one another. In the lower forms this process entails only death, but in the higher there appears a new quality called consciousness which enables it to be attended with pain. The creatures cause pain by being born, and live by inflicting pain, and in pain they mostly die. In the most complex of all the creatures, Man, yet another quality appears, which we call reason, whereby he is enabled to foresee his own pain which henceforth is preceded with acute mental suffering, and to foresee his own death while keenly desiring permanence. It also enables men by a hundred ingenious contrivances to inflict a great deal more pain than they otherwise could have done on one another and on the irrational creatures. This power they have exploited to the full. Their history is largely a record of crime, war, disease, and terror, with just sufficient happiness interposed to give them, while it lasts, an agonised apprehension of losing it, and when it is lost, the poignant misery of remembering. Every now and then they improve their condition a little and what we call a civilisation appears. But all civilisations pass away and, even while they remain, inflict peculiar sufferings of their own probably sufficient to outweigh what alleviations they may have brought to the normal pains of man. That our own civilisation has done so, no one will dispute; that it will pass away like all its predecessors is surely probable. Even if it should not, what then? The race is doomed. Every race that comes into being in any part of the universe is doomed; for the universe, they tell us, is running down, and will sometime be a uniform infinity of homogeneous matter at a low temperature. All stories will come to nothing: all life will turn out in the end to have been a transitory and senseless contortion upon the idiotic face of infinite matter. If you ask me to believe that this is the work of a benevolent and omnipotent spirit, I reply that all the evidence points in the opposite direction. Either there is no spirit behind the universe, or else a spirit indifferent to good and evil, or else an evil spirit.'"