There is no requirement for the Cleric to actually know anything about their deity, if they have one, odd as it seems. The deity chooses to grant them spells, and the Cleric prepares these spells by prayer or meditation; most churches will probably have rituals and traditions related to that preparation but they are simply traditional and not a mechanical requirement. The cleric does not need to make religion checks in order to use their class abilities. We presume that the deity, in their divine wisdom, has chosen an individual who is naturally aligned to their wishes without needing to be specifically educated as to the right path.
However, as the SRD states:
A cleric who grossly violates the code of conduct required by her god loses all spells and class features, except for armor and shield proficiencies and proficiency with simple weapons. She cannot thereafter gain levels as a cleric of that god until she atones for her deeds (see the atonement spell description).
It stands to reason that a Cleric who knows very little about their deity's dogma would be much more likely to inadvertently do something to upset them - though to be clear the requirement is that the Cleric grossly violates the deity's ethics, so it should not be invoked purely because they forgot the right greeting for a religious senior or something. Moreover, though one untrained in a Knowledge skill cannot succeed at checks with a DC greater than 10, 10 is the DC for a "really easy" question in a particular field, which I think the basic tenets of a well-known god would qualify for. So it would not be difficult for such a character to have an idea of actions a particular god would likely find upsetting.
The more subtle issues of morality than can arise are a problem even for characters who do know more about their deity's wishes - there is a magic item, the Phylactery of Faithfulness, which exists specifically to help characters know if their actions are at risk of upsetting their deity or changing their alignment.
All told I don't think it is advisable to seek the punish the character somehow because they lack this particular skill. It is plausible to be a cleric without possessing this knowledge and inability to use the skill for its normal benefits, i.e. identifying the properties of undead and the trappings of particular religions, should be disadvantage enough.