Has an astronaut (or cosmonaut) taken water out of a spacecraft to see if it boils or freezes?
I do not know of any time water was brought out of a spacecraft, but the astronauts regularly had to do a urine dump into outer space. Astronaut Mike Massimino talks about watching the urine freeze. He said they would all watch it, as it was something beautiful to see.
Here are some images of the frozen pee entering the Earth's atmosphere, as seen from the ground Space Shuttle Unleashes Magnificent Plume of Pee.
The shuttle dumped both waste - and when not taking it to the International Space Station - excess potable water generated by the fuel cells.
Since this Hubble mission, STS-125, did not go to the space station, they had to dump both kinds of water. Here is a video taken from payload bay camera A. At about the 4 minute mark it's really streaming out.
Bob516 has answered the question of what happens to water in space, but directly answering your question it would be highly dangerous to take a floating ball of water into an airlock and watch it as you cycle out as the first stage uses a scavenger pump to recapture as much air as possible, and the final stage involves valves that vent the rest of the pressure in a controlled fashion.
The floating ball of liquid water would tend to be sucked into both these systems and neither are something you want liquid water freezing and/or boiling inside since this will tend to rupture/block pipework you need to either finish exiting or get back inside.
So you would most likely not be able to see the water by the time pressure is low enough for things to happen, and then have to work out how to fix your airlock from inside.
For really large scale water in space there is project highwater
The Apollo astronauts on the Moon took water out of their spacecraft the Lunar Module. It was enclosed in their backpacks and was used to cool the astronauts by removing excess heat in a sublimation cooling plate. It was a porous plate, one side exposed to the lunar vacuum, the other side was part of the cooling water loop.
Liquid water filled the pores and evaporated to the vacuum removing heat and causing the remaining water in the pores to freeze and block the pores. The water ice then sublimates (going directly from solid ice to gaseous water vapor) removing additional heat. If the ice in a pore is fully sublimated, the pore is filled with liquid water again and the process repeats.
The sublimation cooling plate was a critical and essential part of the suit life support system. As every other part of the suit, it was tested very thoroughly on Earth in vacuum test chambers.
The astronauts did know very well before launch what happens to the cooling water in their suits and backpacks. No need to do any experiments with water on the moon anymore. They could rely on the functionality of the cooling system.
But water was used to cool also the Lunar Module and the Command/Service Module in a similar way.
Water at room temperature will boil when exposed to low pressure. This can be seen in experiments on Earth:
Whether the water freezes before it all boils off will depend on the quantity of water. Very small droplets (such as the jettisoned urine mentioned in the other answers) will cool faster, and therefore freeze faster, than a big bucket of water. Also, formation of ice is enhanced by having a place to nucleate the ice crystals. So whether the water makes contact with ice crystals or another suitable surface for nucleation will determine how fast it freezes:
At low enough pressure (in space!), water is guaranteed to eventually boil or freeze, since liquid water is not stable at low pressures.
This phase diagram shows that the liquid state is not stable below 611.657 Pa of pressure, irrespective of the temperature. After the water freezes in space, it will evaporate (sublime) directly from the solid phase to the gas phase.
It would be an interesting experiment for a space-walking astronaut to take a water-filled balloon outside.
If you consider the sequence events:
As he either passed through an airlock (or depressurised a capsule in prep for exit), the balloon - filled only with water - would expand somewhat as the pressure fell to zero;
But, if we imagine here a balloon material strong enough not to split, the water would, as the pressure headed for zero, move towards.. boiling;
But, at the same moment if exiting the craft, the temperature experienced by the ballon would drop to an extremely low level - which should freeze the water fairly rapidly into a solid sphere.
It would be interesting dynamics to see which effect dominated: presumably, all down to the timing of exit, the rapidity of pressure drop alongside the rapidity of temperature fall.
Quite possibly the water - containing the dissolved gases of the capsule air - would partially 'boil' internally, momentarily - but while remaining cold, remember, and purely due to the pressure drop - so air bubbles would form, as in a boiling kettle, before the temperature drop took over and froze the liquid to solid.
I would guess you would get a 'cloudy' ball of ice, full of trapped air bubbles.