The molecular geometry of NH3 and H2O can be shown as:
The central atom (N) in NH3 has one lone pair and there are three bond pairs. In H2O, there are two lone pairs and two bond pairs. The two lone pairs present in the oxygen atom of H2O molecule repels the two bond pairs. This repulsion is stronger than the repulsion between the lone pair and the three bond pairs on the nitrogen atom. Since the repulsions on the bond pairs in H2O molecule are greater than that in NH3, the bond angle in water is less than that of ammonia.