Sometimes fish just die. I keep all manner of tropical fish and as a rule of thumb for every 6 you introduce to a tank, 2 will die through shock of the experience, water differences etc etc. However guppies are usually quite hardy fish (or so I have found), so it might be something to do with the tank. If your water pH is alright then try checking the ammonia content, as snails very quickly foul up a tank. Excess ammonia can be quickly and simply rectified with a solution available in all fish suppliers, and you can prevent the problem from recurring by introducing a plecostomos or small catfish to the tank (but be warned they eat crusteaceans so if you want to keep your snails I'd avoid this). You may have some kind of infection in the tank (if fish have died before in large numbers then this is the likely cause), in which case you will be lucky to ever clear the tank of it completely, but removing all the fish etc and boil washing the tank, stones, filters etc etc could help.
When putting fish into a new tank make sure you place the bag with them in in the tank for at least half an hour before opening it, to allow the water temperatures to align, reducing the shock. Also, if you have a tank light keep it off until the fish are settled. Some people advise against feeding the fish on the first day, but I find that giving them a tiny amount of food once they are in the tank distracts them from the shock of the move, and settles them quicker.
Good luck!