To answer this question, one must first understand what an allegory is. An allegory, as defined by eNotes, is
a figurative mode of representation conveying meaning other than the literal.
The allegory, therefore, can be defined as an extended metaphor.
In regards to James Hurst's short story The Scarlet Ibis, one must understand the one element necessary to the underlying meaning of the story: the Scarlet Ibis.
The bird, itself, is endangered at not regarded for its inner beauty based upon its external "ugliness." Like the ibis, Doodle is looked at as different and not truly examined for his inner beauty. His handicap defines Doodle, not who he is inside.
The color of the bird, red, also foreshadows Doodle's death. Given that the color red has historically been used to represent death, the bird's color foreshadows both Doodle's death and the memory of his death for Doodle's brother.
In the end, the ibis represents Doodle in many ways. Both are fragile beings, mentally and physically. Both try to change (Doodle to make his brother happy and the bird to survive).