Why add H2O when calculating the pH of an acid?
Based on what I can make out, you did not use the concentration of $\ce{H2O}$ in either of your calculations. 

In the second case, you wrote it as a part of your reaction equation. Now, the reason for doing this becomes clear when you realise that when you are talking about a $\ce{H+}$ ion, you are in fact referring to a "proton"-- a bare positive charge. Moreover, a proton is extremely tiny, and thus consequently the charge density is quite high. 

This makes it extremely reactive (in a sense), and thus in a chemical system of any sort would immediately seek out and associate with the electron clouds of a surrounding molecule. 

In an aqueous solution an obvious, readily available target is the water molecule, and you end up with hydronium ($\ce{H3O+}$) ions. 

In these particular problems, the solvent i.e water doesn't have a significant effect on the equilibria, however, this may not always be the case; which is why I recommend writing your reaction equations as you did in the second case, as it allows you to identify the acid/base, and conjugate acid/conjugate base in the reaction.