I've seen it written both ways, but it is usually H20. Most of the time I've seen it written as OH2 are when the connectivity of the bonds is shown. Such as CH30H2. That would be a protonated methanol. When writing the mechanism for this reaction, I think water is usually written as 0H2 so that its oxygen is oriented towards the carbon of which is will eventually bond. Ex.
CH3Cl + OH2 --> CH3OH2 + Cl ---> CH30H + HCl
Either way, it's convention, since the empirical formula and structural formula are identical. I think for the empirical formula H is before O, but if it's written structurally I think it can be oriented any way the author wants if it illustrates a mechanism better.