An allegory is a piece of literature that presents an abstract idea in a concrete or physical form, with the purpose of teaching a moral or a lesson. In allegorical stories, plays and essays the writer will choose to personify -- give a character to -- abstract ideas such as love, death, greed, etc. When choosing to write an allegory, you have to first choose symbols and figurative representations for ideas that do not have a material form. The moral of the story also needs to be decided before starting the essay.
First, plan out your essay. The purpose of the writing and the theme should be decided at this point. What will your allegory be? If you want to write on the environment, for example, then create a character that can represent or symbolize the environment. Create other characters that represent different aspects of the environment, and think of a situation to place them all in. This becomes the plot.
Develop your central idea with details. The symbol or metaphor you have chosen in the beginning should extend through the story to give it continuity and consistency. When you start writing, the beginning, middle and end of the essay should be clear. The writing should reflect this clarity of thought.
An effective allegory essay will have a clear moral or lesson which will become apparent at the end of the essay -- even if it is not stated directly, the message will be implicit in the resolution. Make sure the ending of your essay reflects your final thought on the subject. For instance, if you want to show the damage done to the environment by humans, then the character symbolizing "everyman" could end up harming or hurting the character symbolic of the environment.
Proofread your essay to check grammar, spelling and expression. Revise carefully to see that the allegory is sustained in the writing.