I don't think I've seen a theory like this anywhere else on the internet, so I've come up with this theory myself.
In Pokémon X, if you go to Lumiose City, there's a building that's unmarked. Go inside and go to the 2nd floor. When you walk, the screen flickers black. Right behind the main character is a Hex Maniac. Not only is she a hex maniac who randomly appears, when she walks, she makes no movement with her legs.
She will say "No, you're not the one..." and then disappear completely. You will never see her again.
The game gives no explanation. But, if you go to the train station, you can find some unsettling clues. I had to take these pictures with my laptop since I couldn't find any one the internet. If you think these are photoshopped, play the game yourself and see.
Evidence One probably doesn't matter much, but at the station there is a boy who's looking for something. Until you see Evidence Three, you won't know what he's talking about.
Evidence Two is only here to show you where to find Three. Go behind the sign, and look down and press A to find the hidden message.
Evidence Three is the important factor in this theory. "I'm going to go for help. Wait in the usual place." This is mysterious and it's possible that whoever wrote this is referring to the boy. Now, this message could mean that maybe the writer lost directions and told the person he/she is referring to to wait there.
However, the ghost is in a nearby area. Ghosts well, die right? Without the ghost you could debunk this theory. My theory overall is that something happened in the station. Possibly a shooting or a bomb threat, fist fight, anything that could threaten the lives of others. The writer, which I expect to be the ghost girl, is telling the boy she's waiting for to wait behind the sign where its safe if he gets here.
The ghost girl somehow escapes or gets chased out. The girl could have been chased into the building and then was killed when she got upstairs. The body was obviously removed, but her spirit resides there. She waits for the boy still where she died, feeling sorry for not seeing him again. The boy is trying to find the message or the girl.
The only problem I found is that of this happened recently, the place would be closed off, and so time would have to pass, giving the boy no reason to stay there to look for her.
I hope this explains the story of the ghost girl in Pokémon X/Y.
Theory by: AnimalInMe