I have been investigating for an half hour in the Internet and I think there are not many reliable pages in my ignorant opinion so this is my question: is it possible to have hallucinations caused by electromagnetic fields? Are electromagnetic fields capable of modifying normal brain activity? How do electromagnetic fields affect brain activity? If possible, could they be related in any way to the people that claim to have seen a ghost or similar?
Transcranial Magnetic Stimulation (TMS) produces electrical currents in the brain through EM induction. It can do all sorts of temporary things to the brain including inducing hallucinations. See for example https://www.technologyreview.com/s/418887/magnetically-induced-hallucinations-explain-ball-lightning-say-physicists/