In "All Summer in a Day," the children are so mean to Margot because she is an easy scapegoat for their own feelings of loss and frustration which come from living in an endlessly rainy climate on Venus.
Unlike the other children, Margot remembers life on Earth. She only moved to Venus five years earlier and was thus four years old at the time. She recalls the brightness of the sun and the way it burns "like a fire." The other children, who have no memories of Earth, are jealous of Margot's experiences and undoubtedly envy the possibility that she will be able to return to Earth the following year:
They hated her pale snow face, her waiting silence, her thinness, and her possible future.
The other children have no such hope of a bright future and are fairly certain to spend the rest of their days, one after another, in the endlessly rainy jungles of Venus.
Margot separates herself from the other children, making it even easier for them to single her out. She intentionally refuses to play games with them in the tunnels of their underground city. When the class sings songs of happiness, Margot does participate.
In a sense, Margot is the victim of cruel bullying, but she certainly doesn't help matters by refusing to engage with her peers and by reminding them of her own privileged memories.