Just completely hypothetically, imagine you had a computer program that ran a massive physics simulation. And imagine your lifespan is such that you can observe it for massive periods of time. So you set up the starting conditions for a Big Bang, and hit the 'run simulation' button, and watch it go. And eventually, as you knew they would (because of the physics you programmed, and because of statistical likelihoods), some of the matter clusters into solar systems and planets, then on one planet some primitive proteins come about in some inorganic process, then prokaryotes, then an evolutionary process that eventually results in humans.
At that point, you could conceivably think, OK, these interesting entities in a remote corner of my simulation are doing some weird things. They seem to be controlling themselves in this structure in their heads. Perhaps I can put some hooks into the simulation so that I can observe what's happening in those brains. If I can reverse-engineer the structure that's evolved, I guess I could read their thoughts - and even write their thoughts.
And there's a mechanism, whereby "the guy running the simulation" can appear in visions, hear "prayer", and, if he also manipulates the rest of the simulation, perform "acts of god".
I thing somewhere there's a calculation that indicates that, if Moore's Law continues, the probability that this universe is a simulation running on a computer is greater than the probability we're in "real life". But I can't help but instinctively think it's fanciful.