How does Twain attack religion in The Adventures of Huckleberry Finn?
Twain uses the Widow Douglass and her sister to talk about religion. They tell Huck Bible stories, such as the one about Moses as a baby. Huck thinks that story is interesting until he learns it happened a long time ago, then he dismisses it - because he "don't take no stock in dead people." The Widow prays for him - an action that Huck doesn't understand although he does say she didn't mean any harm by it. Probably the most interesting section as far as the Widow Douglas and her sister surrounds the discussion of the "good place" and the "bad place" Huck decides if his friend Tom Sawyer is heading to the "bad place" that's where he wants to be too. As Huck has trouble understanding the religious convictions of these two women, he points out some of the ways that commonly practiced Christianity seems strange.
Twain often wrote about how slavery before the civil war was preached from the pulpit and justified as God's plan. "In this novel, Twain satirizes the pious Christians who professed kindness and civility, but who bought and sold slaves as property before the Civil War." (enotes) In having Huck unable to understand the religion he is being presented with, Twain leaves Huck free to make the powerful decision that he will "go to hell" for not turning in Jim.
I would say that he more pokes fun at religion in the character of the Widow Douglas. She has taken Huck in and tries to civilize him and part of this process includes religion. She is some what a parody of 'good church woman.
In another way, Huck's morals are tested in the scene where he decides to turn Jim in. He has been raised to believe that he must turn him in yet his own feelings and experience tells him that Jim is a person in-spite of what the community has told him. he decides that he'd 'rather go to hell' than to turn Jim in. This is Twain's hinting at that the morals of society are inherently wrong.