The oxygen evolution reaction (OER) plays an important role in evaluating a photocatalyst and to understand its surface chemistry. In this work we present a comparative study of the OER on the oxide NaTaO3 (113) surface and the oxynitride SrTaO2N (001) surface. Oxynitrides are highly promising photocatalysts due to their smaller band gap and resulting better visible light absorption compared to oxides but our knowledge about their surface structure and chemistry is still very limited. With the goal to compare the surface chemistry of oxides and oxynitrides, we perform density functional theory calculations to obtain the free energy changes associated with the OER reaction steps. For the OER at the Ta site of the clean surfaces, our results predict the overpotential-determining step (ODS) for both materials to be the formation of the *OOH intermediate, with a larger overpotential for the oxide than the oxynitride (1.30 V vs 1.01 V). The Na site is found to be more active than the Ta site on the oxide surface with an OER overpotential of 0.88 V, whereas the OER at the Sr site on the oxynitride has an overpotential of 1.14 V. For the A sites, contrary to the Ta site, the deprotonation of *OH was found to be the ODS. Computed Pourbaix diagrams show that at relevant (photo)electrochemical conditions all surfaces are covered with oxygen adsorbates. Oxygen adsorbates at A (Na, Sr) sites are however found to couple and desorb as O2, leaving these sites empty under typical operating conditions. Following this desorption, we find the OER to proceed by the conventional *OOH mechanism on the SrO termination of the oxynitride but by a direct coupling of neighbouring *O at Na sites on the oxide surface. This coupling mechanism on the oxide has the smallest overpotential of 0.79 V compared to 0.88 V for the oxynitride, implying that the oxide is a better OER catalyst. Since it however absorbs light only in the UV part of the solar spectrum this leads to a tradeoff between light absorption and the catalytic activity.