From science point of view, if you start with suggestive setting (such as a game), followed by a flux of magnetic field (common in haunted house).
A errie feeling will arise and can easily be intepreted as ghost/God.
Even wothout the flux of magnetic wave, the suggestion can also have a psychological effect.... Our brain is only a simulation software (of reality). If we focus on bending the rules, our simulation will be distorted.
For example, try poking your eye ball gently and see how the world shake in front of you. (Even though there is no earthquake) In this case, we have distorted the input device of the simulation.
Another way is to see those optical illusions such as putting a half of a chopstick in water to see it bend. It is a trick base on the imperfection in the simulation rule of the brain. In this case, the simulation rule we have is light travel in a straight line.
Otherwise, people can meditate/take drug and cause a shutdown/elipesy on part of the brain to achieve the same effect (like a monk).