It is now a well known fact that Twain had extreme anti-Christianity sentiments, so much so that many of his anti-religious writings were suppressed (kept from submission to publishers) during his lifetime. In light of the negative views he held on the Christian religion and religious practices, many mentions of or allusions to religion that Twain makes will convey his feelings through the narrator's voice, through situations or circumstances, through ironic juxtapositions of religious principle with moral action, and through characters' inner and external conflicts.
While Twain's opinions, by his intention, will intrude into the story in order to make a philosophical point, his characters may demonstrate sincere religious, and even superstitious, beliefs. Sincerely religious and superstitious characters ironically illustrate Twain's personal ideas regarding the harm caused by religion and superstition, which, for Twain, were essentially synonymous belief systems. Religious and superstitious characters illustrate what Twain saw as the painful reality of American society created by wrong-minded belief systems, such as the painful reality of the religiously validated slavery system. Thus not all of these characters did operated falsely behind a belief system merely as a ruse to cover immoral and criminal actions.
This scenario--sincere people developing wrong-minded systems based on wrong-minded beliefs--is what social historian Page Smith called social psychosis (Smith coined the term though it is now used by others), which is a wrong belief held sincerely and unquestioningly by an entire society or segment of society.
So the answer to your question is that, in Huckleberry Finn, some characters hold religious and superstitious beliefs completely sincerely, while others hold them as mere conveniences or screens for questionable actions.
Some Sincere Characters
- Huck Finn: superstition
- Jim: religion and superstition
- Widow Douglas, Miss Watson, Aunt Polly: religion
Some Insincere Characters
- The King
- The Duke