This is something which Peter Atkins once brought up in a debate with William Lane Craig. It is the idea that because we can explain why so many people are religious using evolutionary biology, sociology, and psychology, that therefore there is even less reason to think that religious statements are correct.
Certainly the fact that the non-religious can explain why the religious think the way they do is not evidence against the existence of a god, quite simply because this fact does not concern the existence of a god, it only concerns how people think. All we are saying is that we know why the religious think in the way they do; we’re not saying anything about whether their statements are true.
There is also the point of equivalence. Whilst the non-religious can explain the thought patterns of the religious using deductive science, the religious can equally suggest ideas as to why the non-religious think the way they do, even if those ideas are wild guesses. In order to reveal whose explanation is right, we would need to show there to be a fundamental difference in the theories about how each side thinks.
However, the notion still has a purpose, even if it does not shed light on the existence of a god. One of the big questions that many people think about early on in their investigations into the existence of gods is: why do so many people across the world believe in gods? Some people may consider this question as evidence that a god may exist, because so many people think it to be true. The explanation for this thinking, whilst not evidence against the existence of a god, is counter-evidence to evidence for the existence of a god. It only weakens the case for the existence of a god if a strength-in-numbers argument is used. It is a statement that human beings have certain inclinations, predispositions, in their thinking, towards believing in gods.