As we know that the valence electron of Nitrogen is 5 and valence electron of Oxygen is 6.
In NH3 , Nitrogen share 3 electron with 3 Hydrogen, leaving behind 2 electron unshared ( 1 lone pair), called Lone pair. Similarly, in H2O , Oxygen share 2 electron with 2 hydrogen, leaving behind 4 electron ( 2 lone pair).
A lone pair takes up more space (according to VSEPR theory) than a bonded hydrogen. NH3 has one pair, H2O has two, so the remaining hydrogens have to squeeze closer together. So, NH3 has greater bond angle than H2O.