When a liquid evaporates, the particles of the liquid absorb energy from the container to compensate the loss of energy during evaporation. This makes the remaining water cool.
There are some pores in an earthen pot through which the liquid inside the pot evaporates. This evaporation makes the water inside the pot cool. In this way, water kept in an earthen pot becomes cool during summers.