In my psychology book, it says that an idea about where dreams could come from is the brain trying to make sense of random signals by applying things like emotions and memories. I guess that people conditioned to think in religious terms would tend to have religous dreams. When I was religous, I had that dream with Jesus and other dreams where demons floated around in my room. Now I don't have such dreams. I guess that is because I see the world differently now.
I also remember having an epic dream with werid things happening. I'll write about it soon.