There's been "some" speculation on the flash sideways, and here's my two cents. Hurley, Desmond and perhaps Miles could all tap into "the source", which in my opinion is where the sideways happens. Jacob could tap into the source because he was the protector of the island. I think when you take the job, overtime the island will tell you what you need to know. How else did a naive Jacob turn into Yoda? By gradually gaining knowledge for 2000 years through informative dreams and light mirrors that can DVR someone's life in the past, and maybe the future. When he selected his candidates he knew exactly when/where they were going to be. (Although I don't think the lighthouse shows things that happen on-island, i think it's strictly a window into the outside world that the source provides.)
But I digress...
Desmond could see/experience the "afterlife"/sideways world while Miles could hear them. I think that Hurley's visitors from the other side are in fact the same people we see in the flash sideways, just after there awakenings. Time doesn't exist in the sideways/source, so it doesn't matter when Ana-Lucia had her realization. The dead Losties visiting Hurley were all coming from the source in order to guide Hurley in the right direction because they knew that he'd be the leader someday and have to watch over them a.k.a. protect the light.
Charlie was the first one to appear to Hurley and he's also the person who could influence him the most. Hell, (dead) Hurley probably asked Charlie to crossover from the source. "I am dead, but I'm also here" was Charlie's quote that rang out when Christian was telling Jack about the place they created where time doesn't really exist. Notice how Ana-Lucia looked exactly the same both times we saw her after her death? (Granted, it is a police uniform and always looks the same, but she was even sporting her sunglasses). Michael is in the source, but cannot travel beyond the island like Ana-Lucia, Charlie or Mr. Eko for that matter, that's why he only appeared on island to Hurley.
In summation, if the light went out on the island, then the source/sideways could cease to exist. When MIB became the smoke monster he was able to tap into the source and read peoples thoughts as well as turn into the dead that move into the source. They just needed to be dead in reality, not the island.
Special people like Hurley and MIB (before he was smoke) could see visitors from the source. MIB's Mother did in fact want him to be the protector because she knew about his ability and knew he was fit for the job. When Claudia appeared there was an angelic light around her, so this was not Mother smokey like some people speculated. Jacob turned around and could not see her because he did not have that ability. Just like when Flocke saw a bloody boy Jacob surrounded by the light and Richard didn't. When Jacob appeared again to taunt MIB as a boy, I think this was a different occurrence. The appearance of boy Jacob could be something that only the protector of the island has the privilege to do because others can physically see him, and the fact that the last time we saw Jacob passing the torch (literally) he was not dead. So maybe he experienced all those events long before they actually happened by using his own kind of donkey wheel. I think Jacob performed that ceremony sometime in the future, only for him it was the past and always knew that it was going to be Jack/Hurley.
I apologize for the overuse of the word "source." There you have it and please, be gentle.