The temperature is different because of the molecular make up of sand and water. Sand's atoms are much closer together because it is a solid so they bump into each other causing the substance, in this case sand, to heat up and stay heated longer. Water's atoms are much more spread out than that of sand so it takes longer for it to warm up because the atoms are not bumping into each other as much.