according to the Abrahamic religions, there is merit in belief (that you go to a place that is supposed to be nice), and it is emphasized that the virtuous believe in God and follow its teachings, but it does not actually say how belief in God is actually a virtue.
(In the Old Testament, it says "The fool has said in his heart, “There is no God.” They are corrupt, They have done abominable works, There is none who does good.": fool in this sense means an immoral person, rather than what is meant in modern usage).