It depends on what your initial conditions are, and WHEN the water is heated.
Hot water is heavier...
If you have filled with water 2 identical volume sealed containers with no added air (so no water can evaporate), and
then you heat one of the containers, the hot water is actually heavier after that heating is complete.
According to Einstein Energy has mass. E=mc2.
Therefore when you add energy to something it actually gets heavier. Therefore hot water is actually heavier than cold water, all else being constant.
If you look at it this way, even though the cold water takes up less space as particles are closer together, and the hot water takes up more space, there are still the same amount of particles, and the particles weigh the same. However because you add energy, and energy has mass, the hot water will be slightly heavier.
NOTE: this "increase in mass" is exceptionally, amazingly, agonizingly small and only meaningful theoretically. It would be nearly impossible to measure such a mass difference. For any "real world" applications, hot and cold water weigh the same.
Hot water is actually a little bit heavier than cold water because as Einstein told us E=mc2. So if E, the energy in the water, goes up because it’s hotter then mass, m, must also go up to keep the equation balanced [c, the speed of light in a vaccuum, doesn't change]. So there will be a very subtle and very tiny increase in mass of the hot water, compared to the cold water.
http://www.thenakedscientists.com/HTML/questions/question/2946/
An interesting discussion of this topic at some Physics Forums:
https://www.physicsforums.com/threads/hot-water-is-heavier-than-cold-water.614373/
Cold Water is Heavier...
If you rephrase this experiment by STARTING OUT with two containers of equal volume water, one which is HOT, and the other which is COLD, then clearly the COLD one will be heavier because hot water is less dense and thus has smaller mass per volume. That mass loss far outweigh the relativistic effects of Em=mc^2.
Note that even this has an exception: as water cools below 4 degrees, it gets less dense again. So, there are exceptions if you're talking about water between 0 and 4 degrees. And let's not even get into ice ;)
[ Edited in some detail ]