Plan the elements of your narrative in advance, and consider the overall theme or message you want to convey. Keep it in mind while writing, and focus the different parts of your story to accomplish the goal.
Have a moral or didactic theme to your work. Fables, children's stories and legends are often synonymous with allegory. Construct your narrative to teach a lesson.
Read allegorical classics like George Orwell's "Animal Farm" or John Bunyan's "Pilgrim's Progress" and note the ways in which allegory functions. Reading offers inspiration and tools to develop your own writing.
Name your characters according to their qualities or moral standards. It's helpful to use a reference book or online source such as BehindtheName.com to look up name meanings and origins. Use simple ideas as well such as Goodman or Christian.
Consider using other literary devices such as satire that go hand and hand with allegory. Use metaphor in your narrative to set up situations and plot elements that can be interpreted in multiple ways or convey meaning beyond the basic plot. For example, a story about a character's wrongful conviction or imprisonment can speak to the inadequacies of the justice system.