Yes, religion becomes influential temporarily
Say a bunch of powerful demon-like creatures appear in the world, causing havoc. People would have all sorts of responses; I'd guess that some would flee into shelters while others would attack the demons with whatever weapons they've got available. And after it becomes apparent that conventional firearms aren't doing the job, the military'll step in - and, given the premise of this question, also fail. Many innocent would die as victims while many noble souls would lose their lives in trying to fend off the demons.
Assuming that the demons can rampage unchecked by conventional means, then they do so until they corner a holy figure, say a priest. The priest says his prayers to Almighty <PERSON>, asking that his sins be forgiven as he makes his peace before the demon slaughters him. Then, seeing some holy water, the priest splashes the demon, only to see - miraculously - the demon recoil in pain. The priest sees their opening, and uses more holy water - chanting the Our Father, and is perhaps joined by others in his perish, 'til, poof, the demon lets loose a howl of pain and disappears.
But, the priest isn't a selfish man. God in Heaven has spared his life and shown him the way to save countless innocents. He takes to arms, spreading the word of this discovery - first-responders change tactics to employ Hollywood-style religious exorcisms, and it works! The first demonic assault has been repelled.
Initial shock & reaction
The world was just assaulted by demons! People are scared and searching for answers. How can they keep themselves and their loved ones safe? Oh, religion!
Religious sites would become shelters. People who are naturally inclined to serve society as protectors start their religious training, hoping to gain the power to protect others as the holypeople did in the first demonic invasion. 590
Perhaps there are more incidents, and these observations are upheld.
Thinkers put it together
Thinkers, including but not just scientists, start putting together. It's widely observed that there's some sort of relationship between religion and these creatures that appear to be demonic. But, what exactly is that relationship?
* What exactly determines what is and isn't holy ground?
* What exactly determines if an exorcism works?
* What exactly constitutes a "True Believer"?
* What exactly do demons want?
The question, as stated, doesn't provide us with exact answers to these questions. But, the in-universe thinkers will seek answers and piece it together.
As already observed by other responders on this question, people will then attempt to exploit those rules, whatever they are. For example, if any sort of religion works, people can just create a religion that involves in believing in the idea that demons should go away, and the ritual for exorcism might be saying, in an annoyed tone of voice, "Ugh! Stop possessing people you stupid demon!"
Demons stop being a public danger
After a while, thinkers figure out some sufficiently useful defense against demons, and they stop being a problem. Fear subsides, and that temporary social esteem people had for traditional religion declines, a bit.
There would still be major questions about why these generic demon-like creatures even cared for the hodge-podge of mutually-contradictory beliefs that Earth's various religions represent, which by itself is a strange thing. Some people might think that you, the author, exist - since, why else would something so stupid dramatic happen without any apparent connection to reality as they've known it? You, the author, would become a plausible physical force in the universe, and people might start to speculate on what weird thing you'll do next to make the story more interesting.
The research continues
While the people of this world have figured out a working defense, researchers will always want to learn more, improve existing solutions, and discover new options. Some will try to optimize whatever solution they've got to make it easier, cheaper, and more reliable. For example, why exactly does holy water hurt them, and what is the minimal quality needed for something to have that property?
Others will want to study the demons. What are there? Where were they from? What the heck were their bodies made out of? If captured and contained, could we use the material from their bodies to build new tools? If launched into the sun, would a demon survive there, being constantly blown around by the onslaught of nuclear explosions? What about if thrown into a super-massive black hole?
Others would want to study the physics that the demons imply. For example, we don't know how to teleport, but apparently the demons do. How are they doing that? If we could reverse-engineer whatever a demon's body does, we might be able to make teleportation devices, along with all of the insane technologies teleportation would enable.
Others would seek to dominate demons. 446