Why do snails come out after the rain?
Snails are similar to amphibians in that they breathe through their skin (though they also have gills or lungs). Under dry conditions, they seek cover to combat dessication. But when it rains, they "come out," just like many amphibians.

I should qualify the first sentence to say SOME snails. There are aquatic snails and terrestrial snails (which I'm sure you're referring to). Aquatic snails generally have gills, while most terrestrial snails have a single lung (I think).

Slugs, like snails, are generally found in moist areas and can often be seen after a rain.

I don't know of a single reference that pulls it all together, but this is a good place to start...

The Living World of Molluscs