Diamond's unique properties has found it numerous applications in electronics, optics and medicine. As desirable are diamond's potential applications, it is notoriously difficult to process on the nanoscale. Anew and promising mechanism involving a two-photon laser induced desorption could solve many of these problems. However, the underlying mechanism of this process is still not well understood; what is known, is that oxygen plays an important role. Therefore a detailed and consistent understanding of the fundamental behaviour of oxygen on diamond surfaces is required. In the present paper, systematic density-functional theory calculations are performed to investigate the interaction of oxygen with the low-index surfaces of diamond, taking into account the effect of pressure and temperature. This affords predictions of the surface atomic structures, including the newly discovered keto-ether structure on the C(110) surface, and the associated properties such as the adsorption energies, work-function, surface dipole moment, electron density difference, density of states, and electronic bandstructure. By including the effect of the environment, namely, the oxygen pressure and temperature in which the surface is held, surface phase diagrams are obtained. From these results, and using the Wulff construction, the shape of oxygen-terminated nanoparticles are predicted. Further, using the calculated surface free energies, the surface populations of different structures on the C(100), C(110) and C(111) surfaces as a function of temperature, for both atmospheric pressure and ultra high vacuum conditions are evaluated. Interestingly, the results predict that although the full monolayer bridge site on C(100) has the highest population, the top site ketone structure can be populated by as much as 20% and coexist. Regarding the half monolayer bridge structure on the reconstructed C(111) -(1 x 2) surface, the bandstructure shows that it possesses no surface states in the band gap making it attractive for quantum sensing applications and is the most favourable structure at this coverage. Interestingly, the calculations predict another structure that is only 0.02 eV less favourable and so is likely to coexist on the surface. Overall, the present work provides a most comprehensive theoretical understanding of the interaction of oxygen with the low index diamond surfaces, which maybe valuable for future studies of this system.