Just a bit of water enables one to turn a pile of dry sand into a spectacular sandcastle. Too much water however will destabilize the material, as is seen in landslides. Here we investigated the stability of wet sand columns to account for the maximum height of sandcastles. We find that the columns become unstable to elastic buckling under their own weight. This allows to account for the maximum height of the sand column; it is found to increase as the 2/3 power of the base radius of the column. Measuring the elastic modulus of the wet sand, we find that the optimum strength is achieved at a very low liquid volume fraction of about 1%. Knowing the modulus we can quantitatively account for the measured sandcastle heights.