I think it is more of a commentary on the human nature and behavior under extreme circumstances. Yes, the setting is very religiously painted, but I think it is here more to emphasize the main message, and less to comment on the religion itself.
Let's take a look at the two religious main characters.
Keller Dover is a deeply religious, one might say quite typical character (God, family, guns, paranoia from "anything that might happen",...). All that crumbles down when his daughter is kidnapped. He attacks Alex, later on he kidnaps him, tortures him,... By the end, when he is about to kill Alex, he prays:
...
Give us this day our daily bread, and forgive us our trespasses, as we...
[ breathing heavily ]
As we for...
[ exhales sharply ]
As far as we know, he doesn't finish. At this point, he realizes what he became, how far he strung away from what he believed to be most important to him. However, he also hesitates in killing Alex, and seems cracking under his own deeds, while human and demon in him fight.
Holly Jones, as she herself explains:
My husband and I were very devout at one time. Spent our summers driving around in that camper with our son, handing out pamphlets, spreading the good word.
After our son died of cancer, we started seeing things differently.
I see this as another example, in essence not very different from Keller, of deep devotion when things went smooth, and straying from the "good word" (that they themselves were preaching) after they were hit by a family tragedy.
Both of these characters needed a guilty face for their trouble (Keller turned on Alex, while Holly and her husband turned on God), both of them forgot the teaching of their own religion (and, more importantly, humanity) and went to a complete opposite when they faced the loss of a child,... Notice that they both violently attacked little children, since Alex was - very early in the movie - established to have the I.Q. of a ten years old child.
As Holly herself said (my emphasis):
Making children disappear is the war we wage with God. Makes people
lose their faith. Turns them into demons like you.
Apart from the wording and apparent direct motivation of a character, this has nothing to do with religion. This direct motivation for killing children does come from Holly's and her husband's religion. Without it, they would have no one to wage their war against, at they would find meaning in killing innocent children. This is not unheard of, people doing terrible things in the name of religion.
I think that this is really the only thing that may be considered as an attack on religion. But I also think it is here more as an explanation of the characters motivation. Instead of a cliche explanation "they are crazy" (which is a shallow explanation that script writers use as a synonym for "we had a good story, but couldn't explain why this all happened"), this gave a nice, realistic explanation of what was going on and why. Religion-crazed people do kill other people, including children, all the time. Random lunatics are not so common in the real world.
It also serves the realism in another way: there are no absolute villains. Keller (almost) lost his daughter, but did terrible - we might say worse than death - things to Alex, who turned out to be just a misunderstood victim. Holly and her husband were monsters, but they themselves suffered the terrible fate of losing a child after leading what they perceived as an exemplary life. Nancy and Franklin didn't directly do as much damage to Alex as Keller did, but they are far from being innocent; however, they had their fair share of pain before walking that path.
If anything, the movie is a commentary on how nothing is black and white, and how people crack when it's about their children, and religion is there as a way of showing that, instead of being the main topic itself.