In an aqueous solution (i.e. a solution where water is the solvent), the concentration of water is about 55M. Any reactions that occur in water that use water as a reactant or product will not significantly change the concentration of water in the solution. Therefore, one can treat [H2O] as a constant that gets added into the equilibrium constant.