When discussing symbolism in any piece of literature, one must consider when it was written and the people or organizations that had influence at the time. For example, the Catholic church and the Bible had great influence in the people's lives during Shakespeare's time. Images from the church and the book were used to help audiences understand themes and characters' motivations. In A Midsummer Night's Dream, supernatural and Christian images seem to combine together to create a world of great imagery and magic.
For Hermia's nightmare, the evil Christian symbol of a snake is used in order to draw an allusion to Adam and Eve. Lysander and Hermia are similar to Adam and Eve because they go off together to face the world alone--and to elope. Hermia seems to represent Eve who meets a snake; but this snake eats her heart!
"Help me, Lysander, help me! Do thy best
To pluck this crawling serpent from my breast.
Ay me, for pity! What a dream was here!
Lysander, look how I do quake w2ith fear.
Methought a serpent ate my hear away,
And you sat smiling at his cruel prey" (II.ii.145-150).
It's as if Hermia's nightmare also symbolizes a premonition about future events as Lysander's heart magically turns towards Helena due to Puck's mistake. One might also consider this a type of foreshadowing about how Hermia's heart will be tested as she fights for her love with Lysander to survive. The snake itself, however, seems to be a Christian image from the story of Adam and Eve in the Garden of Eden.