The story can be considered an allegory because the society is wiped out in the end, and the children who are different are rescued. Prejudice directly results in destruction.
An allegory is a morality tale, which is designed to teach a lesson.
The people have created a society based on a myth. They assume that the people who are aberrations have somehow caused their destruction. They have literal belief in the Biblical Apocalypse, and blame the “mutants” or anyone who is different.
When David meets Sophie, he has his first interaction with someone who is different. Sophie is perfectly normal except that she has six toes, and this makes her a mutant.
'If anyone were to find out, they'd -- they'd be terribly unkind to her. We've got to see that that never happens.' (ch 1)
As in many allegories, we see the morality tale through David. He does not understand why Sophie should be targeted by the society, just because she was not made “in God’s image.” Through the innocence of youth, we see that the society is wrong.
David is also different, because is a telepath. His mutation is much easier to hide than an extra toe though.
In the end, the telepaths are rescued by The Sealand, who destroy the bigoted former society and rescue the telepaths.
'Can't you guess, David? It's people. Lots and lots of our kind of people.' (ch 17)
The message is clear: the good guys win. The people who were once mutant are the ones who are saved, and their tormentors are wiped out.