What role does the tormented child play in the story "The Ones Who Walk Away From Omelas?"
In "The Ones Who Walk Away From Omelas," the utopian society of Omelas is whatever the reader makes of it; it can be as urban or rural as desired. However, the entire fantasy of Omelas is dependent on the suffering of a single child, living in filth and locked in a closet. All the citizens know about it, and most accept it as the price for their happiness and prosperity.
The child is normally identified as an allegory; the people of Omelas accept its mistreatment because it allows them their own comfort. Similar situations are seen all over the world, and in most developed countries the majority of the middle-class population ignore the lower-classes, homeless, or poverty-stricken people because they feel they can do nothing substantive to help them. They are not themselves mistreating the poor, but they are not doing anything to help them either.
In the story, the child stands for the unstated moral code of Omelas:
If the child were brought up into the sunlight out of that vile place, if it were cleaned and fed and comforted, that would be a good thing, indeed; but if it were done, in that day and hour all the prosperity and beauty and delight of Omelas would wither and be destroyed. Those are the terms.
(Le Guin, "The Ones Who Walk...," liferoar.wordpress.com)
"The Terms" are the unspoken agreement of all that the child's mistreatment is acceptable given the utopia that exists. With everything so good, why should the suffering of one single person matter? The moral code of Omelas could read: "The Collective takes precedence over the Individual." The child, who might have been entirely healthy at birth, is simply sacrificed with no thought to its future so the utopia can survive. The people of the title, who are so struck by the situation that they leave Omelas and never return, are the people who feel that they cannot save the child but will not continue to be part of the society that deliberately mistreats a single person for its own benefit.