I don't believe in ghosts.
But, I wonder what would happen if some fungus or bacteria was able to release a compound that could get into the brain and stimulate the visual cortex enough to make it think it was seeing something? The human brain can get quite enthusiastic about filling in missing details. It might well then just make something up for you, which you then get to "see".
You might even get consistent "sightings" from one person to another if there was something in the room which got used as a starting point for the made-up details. Perhaps a pattern in the wallpaper, or a particular stain in the floor boards.
If the bacteria/fungus/whatever involved also had its own reasons for releasing the chemical then it might also only ever get strong enough to have an effect at particular times of the day.
Might also affect other animals (e.g. dogs) with similar brain structures.
Should be quite easy to test if you have access to a mass spectrometer.
Or failing that, a dehumidifier might stop the bacteria/mold/whatever from doing its thing.