Allegories are stories, poems, or pictures that can be interpreted to reveal a hidden meaning. (Ex: "The yellow sun sat in the sky, beaming down on those who looked upon it." The sun, being yellow, could symbolize hope for a new beginning since the sun rises and sets at the start and end of each day.)
Commentaries are expressions of opinions on a piece of text, often offering explanations.
The two go hand in hand. Allegories may require commentary in order to understand the underlying meaning of whatever you're seeing/reading.