http://en.wikipedia.org/wiki/Drexler%E2%80%93Smalley_debate_...
But who knows. Maybe when society is so advanced that we have infinite power from controlled fusion, extremely accurate and high powered lasers and magnetic field generators, and quantum computers, we'll be able to build a box that moves around individual atoms to construct something.
Making water out of anything else, is possible in molecular quantities at an exorbitant price using a particle accelerator (or so). So in practice, impossible.
A Star Trek Replicator, even one that doesn't transmute different elements into each other and just re-arranges them, is a long way off. The best current design we have is called an ecosystem and uses plants, fungi, animals, other life forms and sun light.
You can also extract amounts of oxygen and hydrogen from more complex substances and turn them into water through the magic of that science we know as Chemistry. You should expect that this will generally take a bunch of energy, though.
Nanotechnology has the potential to let us construct much more complicated sorts of chemical structures. It would be really neat, but wouldn't really change how much energy it takes to separate water out of other materials, and would probably be a lot less energy efficient than standard industrial methods.