Dear Student,
Earthworms have no respiratory organ and hence the exchange of gases (respiration) takes place through the moist skin. The oxygen from the environment diffuses passively across the moist skin and it is carried by the circulatory system to the cells. Similarly carbon dioxide from the cells is also carried by circulatory system and diffused out through the moist skin. So they respire through their moist skin and will die if their skin dries out.
Regards