Your Question: How did water come to earth?
Your answer: As a standard comet nears the heat of the Sun, the ice particles from its nucleus sublimate or go directly from solid ice to a gas, which can then condense later into liquid water if it were, say, to arrive on a planet's surface.
Hope this helped! :)
˜”*°•..•°*”˜