This type of cooler works by evaporation ie the latent heat of vapourisation of the water draws energy from its immediate surroundings.
You can feel this effect for yourself if you ever get a low boiling point liquid like acetone on your skin (not recommended on bare skin but you can still feel the effect through thin gloves).
Below its boiling point water can only evaporate from it's surface (in fact this is the definition of boiling) so placing it in a porous medium, in this case an unglazed pot greatly increases the surface area available for evaporation.
Again you can see this in the fact that a glass of water will take a long time to evaporate but of you pour it out onto a flat surface it will disappear quite quickly.
Clearly this works bet if the porous medium is damp rather than completely soaked as the idea is to have a thin film of water which is constantly replenished as it evaporates.
The wet sand provides additional surface area and also is an effective way of keeping the outer pot damp but not saturated while allowing conduction of heat from the inside of the vessel to the outside surface.