One of the possible solutions to the world’s rapidly increasing energy demand is the development of new photoelectrochemical cells with improved light absorption. This requires development of semiconductor materials which have appropriate bandgaps to absorb a large part of the solar spectrum at the same time as being stable in aqueous environments. Here we demonstrate an efficient, computational screening of relevant oxide and oxynitride materials based on electronic structure calculations resulting in the reduction of a vast space of 5400 different materials to only 15 promising candidates. The screening is based on an efficient and reliable way of calculating semiconductor band gaps. The outcome of the screening includes all already known successful materials of the types investigated plus some new ones which warrant further experimental investigation.