Why does Simon lose consciousness when the Lord of the Flies speaks to him?
Simon is epileptic, and he knows even as it is happening that his hallucination of the pig's head is the result of "one of his times". His vision alters, and he feels dizzy:
Simon’s head wobbled. His eyes were half closed as though he were imitating the obscene thing on the stick. He knew that one of his times was coming on. The Lord of the Flies was expanding like a balloon.
Symbolically, though, SImon's losing consciousness is more than just his epilepsy. It's also a foreshadowing of his death, to come when he tries to bring the news of the real beast (the parachutist) to the others, and they "do" him, just as the Lord of the Flies suggests:
“We are going to have fun on this island! So don’t try it on, my poor misguided boy, or else—”
Simon found he was looking into a vast mouth. There was blackness within, a blackness that spread.
“—Or else,” said the Lord of the Flies, “we shall do you? See? Jack and Roger and Maurice and Robert and Bill and Piggy and Ralph. Do you. See?”
Simon was inside the mouth. He fell down and lost consciousness.
So two reasons: a literal one, and a symbolic one.
Hope it helps!