Atheism has long been closely associated with nihilism, both for good and for bad reasons, but usually for bad reasons in the writings of critics of both. It is alleged that atheism necessarily leads to nihilism because atheism necessarily results in materialism, scientism, ethical relativism, and a sense of despair that must lead to feelings of suicide. All of these tend to be basic characteristics of nihilistic philosophies.
In some ways the connection between nihilism is valid but in other ways it is not disentangling the two requires first a better grasp of what atheism is all about and how premises of critics tend to cause them to misrepresent it. Fundamentally, atheism is simply the absence of belief in the existence of any gods it does not require that one adopt materialism, scientism, ethical relativism, or a sense of despair over the apparent meaninglessness of life.
Those who invest much in traditional religious beliefs do not, however, quite see things that way. For them, their religion and theism are what provide them with morality, with meaning in life, and with a sense of connection to eternal, spiritual values. Without their religion and without God, they find it inconceivable that a person could hold on to any of those things.
And, in all fairness, some atheists do abandon those positions. Most atheists (in the West, at least) tend to be materialists of one sort or another, not believing in any non-material or supernatural realm. Atheists are also generally ethical relativists, adopting one form or another of ethical nihilism. And, finally, there are plenty of atheistic existentialists who believe that human life is objectively meaningless.
Few, atheists, however, actually go so far as to commit suicide or engage in wanton criminality as the conservative religious critics insist must logically conclude from these positions. This should be a strong signal that what the critics contend are "logical connections" are in fact nothing of the sort. When we look closely we can also find that some of these positions have been adopted by devout religious believers. Existentialism was originally developed by Christian thinkers, for example.
So atheism doesn't necessarily lead to nihilism while nihilism isn't necessarily a product of atheism. Is there, then, any connection at all? It is certainly arguable that atheism makes nihilism easier for example, Nietzsche made the case that widespread atheism overthrew the only interpretation (theistic) of the world that was really popular. As a consequence, people got the impression that there wasn't really any meaning out there at all and so lost hope.
At the same time, however, even this connection has in many ways disappeared. Today the negative image of nihilists is associated less with nonconforming atheists and more with overly conforming, robotic workers of the post-industrial age. It is argued that the heavy regimentation of the corporate world robs a person's life of all color, vitality, freedom, reducing a person's humanity to the point where they feel personally alienated from all that they do. In the end, after everything is packaged and sanitized and processed, there is nothing of real value left for them.