Sand has much lower specific heat than water. A low specific heat means sand doesn't need much energy from the sun to warm. That's why when the sun comes out in the middle of the day, sand goes from comfortable to hot quickly. At night, when the sun goes down, the sand cools also very quickly.