Two-dimensional (2D) materials unique properties and their promising applications in post-silicon microelectronics have attracted significant attention in the past decade. Recently, ferromagnetic order with out-of-plane easy axis in a monolayer of CrI3 has been observed and reported, with a Curie temperature of 45 Kelvin. Here we study, using density functional theory (DFT) calculations, how hydrogen and oxygen adsorption affects the structural, electronic, and magnetic properties of a CrI3 monolayer. Our results show that while the structure remains almost unchanged by the adsorption of hydrogen, adsorption of oxygen completely distorts it. We have also found that both the adsorption of hydrogen and oxygen atoms significantly influences the electronic and magnetic properties of the monolayer. While hydrogen quenches the magnetic moments of Cr atoms, oxygen introduces an impurity band in the gap. Interestingly, we find a strong enhancement of the Curie temperature by full hydrogenation, while the results are not conclusive for O. This result suggests a simple and effective approach to manipulate the electronic and magnetic properties of 2D magnets for spintronics applications.