Dear Student
Ammonia gas has highly appreciable solubility in water because water molecules forms very strong hydrogen bond with the nitrogen of ammonia resulting the high solubility.
Carbon dioxide is fairly soluble in water. This is because of the polar nature of CO2 molecule and hence due to polarity it can dissolve in water. Oxygen is sparingly soluble in water, because the kinetic energy of oxygen gas molecule is very high and hence it can evolve out from the water easily . So, it is sparingly soluble at high pressure and low temperature.
Regards.