Water would freeze on the moon, but the water on the moon would not freeze in the same way that it freezes on Earth.
Mars has a lack of atmosphere like Earth and low temperatures, so the water on mars would freeze rapidly and then sublimate also known as turn directly into a gas if exposed to sunlight.
And in permanently shadowed regions that are near the lunar poles, water ice can exist for extended periods of time.
The moon is also a vacuum and so a small amount of water at room temperature would evaporate immediately regardless if it was day or night.
We would freeze on Mars if you're at the poles during the day.
Although if you're near the equator on mars, you would not freeze during the day as temperatures in the daytime near the equator on mars can reach 70 F.
Although the average temperature on Mars is around -80 F and it gets colder at night aside from near the equator.
Mars itself is very cold and has an average surface temperature of around -81 F degrees and so you would freeze pretty quickly without a proper spacesuit.
Temperatures on mars can also fluctuate drastically and range from a high of 70 F to a low of -225 F especially at the poles.
Mars also has a very thin atmosphere and about 1 percent of the density of Earth's atmosphere, which means that mars does not retain heat well, which leads to the extreme temperature variations.
And although the air temperature may be -81 F at 30 km/h wind speeds, a given temperature on Mars would feel warmer on earth as a result of the thinner atmosphere.
Mars is the 4th planet from the Sun and is a popular subject of space exploration.
Mars is known for it's reddish appearance due to iron oxide on it's surface and it also has a thin atmosphere, and evidence suggests that mars may have had liquid water at one time.
Mars is a terrestrial planet, which means that mars is rocky like Earth and also has 2 small moons, called Phobos and Deimos.