Allegory: The term loosely describes any writing in verse or prose that has a double meaning. This narrative acts as an extended metaphor in which persons, abstract ideas, or events represent not only themselves on the literal level, but they also stand for something else on the symbolic level. An allegorical reading usually involves moral or spiritual concepts that may be more significant than the actual, literal events described in a narrative. [Literary Terms and Definitions. Dr. Kip Wheeler, Department of English, Carson-Newman College.]
Paul Bunyon's Pilgrim's Progress is a Christian allegory, which means that, as an extended metaphor, the characters and action of the narrative have a double meaning and that the underlying metaphorical spiritual and moral meaning overrides the importance of the literal narrative meaning: the moral and spiritual lessons of the story are more important than the action the characters undertake. This is relevant because when asking what the morals of the story are, the answer must come from the meaning of the whole book in its entirety.
The many morals include being faithful to Christian theology, belief and practice; being hopeful toward the coming resurrection and union with the God of Christianity; aspire toward attaining a place in the "Celestial City" of Heaven; don't be feeble minded and blown from your path by every idea that comes along; be valiant in defending the truth of Christianity; don't yield to despondency; be forever honest with persons; be steadfast in pursuing the righteous of those who attain the Celestial City; bear no ill-will toward others; don't prejudge persons, places or ideas; don't be ignorant, lacking in knowledge, training and information; don't be obstinate about doing what is good or right; continue progressing on the pilgrim's path to the Celestial City and righteousness. Two most important morals can be extrapolated from the whole, however.
The first most important moral is that while on the pilgrim believer's journey to the ultimate goal of the Celestial City of Heaven, you must not allow yourself to be distracted by actions, beliefs or attitudes that will deter you and waylay you in some slough or other trap of unrighteousness and faithlessness: keep looking toward the goal and keep progressing in the spirit and attitude of joy and steadfastness. The second most important moral, pointed out as important by being the subject of the climax of the story, is that ignorance must be corrected or it will surely lead to (1) a failure to attain the Celestial City and also to (2) eternal suffering, separation from the righteous and destruction.
Though some critics question Bunyon's choice to have the punishment of Ignorance as the climax of the story, when seen in this light, as the second most important moral, and when seen as the antithesis (opposite) of the progress toward the goal in the correct spirit and attitude, it is easier to see why Bunyon chose this climax since it accentuates what he saw as the greatest obstacle to successful progress for the pilgrim.