Refusing entry based on nationality or stamps is usual, but is there any state that refuses people based on their religion?
As a counterexample, the official position of the Saudi government is now to not forbid Jews from Saudi.
There are no official laws in any country, not even in Saudi Arabia (asked a friend from Saudi Arabia) that blindly refuse entry based on your religion, if you follow any.
However, your religion can affect how your visa applications are processed.
The most famous case is when a Jewish person tries to visit an Islamic country, or when an Islamic person tries to enter Israel. In almost all cases, visa applications are refused. But I could not find any official reference to it.
If you go beyond tourism, there are lots of laws based on the religion.
Getting permanent residency or citizenship, or when you apply for a work permit or such visa, there are many countries that take your religion into account.
Pakistan: you must be Islamic if you want to settle down. Even the Islam has divisions, and some of them are not considered.
Japan: it's very difficult (if not impossible) to settle down in Japan if you are a Muslim. Update: It seems I was wrong in this. See here.
Jewish -> Islam issues. If you have an entry seal from Israel, you will be denied entry to Kuwait. Egypt and Jordan (neighboring countries) have some agreements and do allow visitors. But Kuwait and Saudi Arabia: No.
I can't even remember filling out visa forms that asked my religion. Unless it's an edge case, you should be fine. However, note that practicing religion while you are inside a country is sometimes frowned upto and it can be illegal too. There are some stories coming out from Middle East that punished a foreign Buddhist labor for owning a lord Buddha statue.
Yes. I recently visited Saudi Arabia, and on both the visa application and on the landing card it asks for religion.
Based on anecdotal evidence, answering "Jewish" will result in your visa being rejected, without a specific reason for rejection being given. Answering "atheist" has also been stated by several people as being a reason for visa rejection, however again no specific reason is given for the refusal.
Saudi will also refuse entry if they have proof of travel to Israel, and to Israeli nationals so it fits all of your categories.