To answer this question have a look at these pictures...
Does this Worm have lungs?
Have a look at this Xray
What do you think?
To answer the question in a nutshell. NO EARTHWORMS DON'T HAVE LUNGS! You guessed it the xray is a fraud.
Seriously though, if they don't have lungs...
How do earthworms breathe?
Earthworms breathe through their skin. Their skin must remain moist for them to breathe. Like us, they still need to take in oxygen and expel carbon dioxide. However because they don't have lungs, this process happens though their skin.
It's not uncommon to see worms coming to the soil surface after saturating rains. Some hold the view that they suffocate in water saturated soil because there isn't enough oxygen. However worms can survive for some time in water. Some of my worms have survived more than 6 hours in oxygenated water while making worm tea (a liquid fertilizer), what about yours?