Avoda zarah is one of the things prohibited by the Seven Noachide Laws. But what about atheism? I know that the 7 Laws are often taken to include a larger number of halachot from the Torah, so would the prohibition against avoda zarah expand to include kefira as well?
Rav Moshe Feinstein, in a t'shuva about allowing children to say a generic prayer in public school (Orach Chayim II #24), refers to the Ramba"m's statement in Mishne Torah that Adam Harishon was given 6 commandments, including belief in God. No'ach and his descendants later got one more, adding up to 7. They both conclude that not only the negative aspect of believing in God is necessary - i.e. not serving other deities - but also the positive affirmation of His creation and provenance over the world, when circumstances call for it. Rav Moshe also uses the inference from the words of Ramba"m explained in @Yishai's answer.
Given the Rambam's statement:
Anyone who accepts upon himself the fulfillment of these seven mitzvot and is precise in their observance is considered one of 'the pious among the gentiles' and will merit a share in the world to come.
This applies only when he accepts them and fulfills them because the Holy One, blessed be He, commanded them in the Torah and informed us through Moses, our teacher, that Noah's descendants had been commanded to fulfill them previously.
However, if he fulfills them out of intellectual conviction, he is not a resident alien, nor of 'the pious among the gentiles,' nor of their wise men.
It would seem that the answer is no, it is not permitted.
As far as I'm aware, just about every posek assumes that all nations are obligated to believe in God in some way or another. This is stated explicitly by Rav Shmuel ben Hofni Gaon (commentary to Beraishis 34:12), Rabbeinu Nissim Gaon (intro to Talmud), probably the opinion of the Sefer Hachinuch (commandment 417, and Minchas Chinuch there), Maharal (Gevuros Hashem ch. 66, in his comparison between murder and the denial of God), Maharatz Chajes (Kuntres Achron published in the end of Minchas Kanaos), the Chazon Ish (Y.D. 62:20), R. Yaakov Kamenetsky (Emes L'Yaakov Beraishis 8:22), R. Moshe Feinstein (O.C. II:24), R. Reuvain Margolios (Margolios Hayam Sanhedrin 56a #25) and R. Ahron Lichtenstein ("Seven Laws of Noah" pg 78).
Most of the above assume that this is the case either because there needs to be an underlying philosophy behind keeping the seven commandments (see Rambam Hil. Melachim ch. 8), as part of the prohibition of idolatry, or because it is included in the restriction against blasphemy (this is stated explicitly by R. Margolios and R. Lichtenstein).
However, there is, as far as I know, one posek who disagrees: R. Moshe Shternbach. He writes in Teshuvos Vehanhagos 3:264 and 3:317 that non-Jews are not obligated in believing in God, as this is only obligated for (and perhaps the only difference between them and) geirei toshav.
I am an Italian ben Noach.
In my opinion, the question must be analyzed on two different levels.
The first concerns the application of Noahide Law by a human court: from this point of view, Rav Sternbuch points out very correctly that the prohibition against idolatry requires Gentiles simply to refrain from worshiping any entity other than HaShem; therefore, an atheist who does not perform acts of worship towards idols cannot be held legally responsible, by a court of justice, for having violated this prohibition. Again on the juridical level, it also does not seem to me to be disputable that an atheist is in a position to observe the other six Noahide precepts, including in my opinion the respect of the prohibition of blasphemy, a crime whose perpetration is not determined, before a court of justice, from the simple belief in the non-existence of the Almighty.
The second plan instead concerns the divine judgment towards the atheist Gentile: if he does not commit acts punishable by an earthly court under the Noahide Law, will he or will not have a part in the world to come?
On this aspect, it seems to me that the sources of the Jewish Tradition, despite their laconicity, exclude the possibility for the atheist of such participation.
In the Gemara Sanhedrin 105a it is said that those Gentiles "who forget the Almighty" have not a share in the world to come. Now, it seems very difficult to me to think that an atheist, who believes in the non-existence of HaShem, can be excluded form those who "forget the Almighty".
As for Rambam, his position appears to me even more clear in the direction of an exclusion of the atheist from the world to come. It is true, in Mishneh Torah-Hilchot Melachim 8: 11, according to the authoritative version of the Yemeni manuscripts, Maimonides defines "wise Gentiles" the non-Jews who observe Noahide Law out of rational conviction and not because they believe that these precepts have been revealed. by HaShem. However, regardless of the condition of these "wise Gentiles" after their death, it seems to me to be totally excluded that Rambam would consider possible for an atheist to assume the status of a "wise man".
In Mishneh Torah- Hilchot Yesodei haTorah 1:1 Maimonides in fact says that:
"The foundation of all foundations and the pillar of wisdom is to know that there is a Primary Being who brought into being all existence. All the beings of the heavens, the earth, and what is between them came into existence only from the truth of His being ".
And furthermore, in Mishneh Torah- Hilchot Teshuvah 3:6-7, Rambam states that:
"The following individuals do not have a portion in the world to come. Rather, their [souls] are cut off and they are judged for their great wickedness and sins, forever: the Minim; (...) Five individuals are described as Minim: a) one who says there is no God nor ruler of the world (....)
"Ben Noach" as defined by Sanhedrin 56a refers to all non-Jewish humanity, to Gentiles on a whole. The seven commandments that all Gentiles are commanded to keep are the law of judgements, and prohibitions against cursing God's name, worshipping idols, forbidden sexual partners, murder, theft and eating meat taken from an animal while it's alive. According to the Talmud, all the commandments are prohibitions, only prohibitions being counted amongst the seven except one, the law of judgments which is the only one to have an active and prohibitive quality (Sanhedrin 58b-59a).
The seven commandments concern actions that a court can judge, not beliefs. And according to the Talmud, Maimonides and Sefer haChinuch, breaking any of the seven laws brings the liability of death. Sanhedrin 57a says "their warning is the death sentence" and "a child of Noah is executed for the violation of the seven laws". Mishneh Torah, Laws of Kings and Wars, chapter 9 law 14 states that "A gentile who transgresses any one of these seven commands shall be executed." Sefer hachinuch, law/section 26, states, "And there is yet another difference – as when the nations transgress one of their [seven] commandments, they are always liable for the death penalty."
Based on the prohibitive qualities of the law against idolatry, the fact that the laws govern actions and not belief, and the fact that breaking one of the seven laws brings the liability of death in a righteous court, it is clear that belief in, acknowledgement of, fear of and recognition of God is not one of the seven laws. A person does not get the liability of death for not acknowledging the existence of God.
Therefore, atheism is permissible for Gentiles ("bnei noach).
This is not about whether it is morally important to accept the truth of God's existence. It's not about whether there may be some moral obligation (not divine obligation or seven law obligation) to know that God is. The fact is that the seven laws do not forbid atheism for Gentiles at all.
Unfortunately it is too enticing for those who know of the divine commandments for Jews to mix them up with the innately different set of divine commandments that Gentiles must keep.