This is because large specific heat of water as compared to the specific heat of sand. due to large specific heat , it take water longer to heat Up and cool down. on the other hand, the sand has smaller specific heat , and hence heats up or cools down faster. So on a hot day , the sand on the beach , heats up quickly while the water heats up slowly. hence the water is cooler as compared to sand at the beach.