Using first-principles calculations, this paper systematically investigates the ionization potentials (IPs) and electron affinities (EAs) of nonpolar surfaces of binary divalent metal oxides with formally closed-shell electronic structures, namely, BeO, MgO, CaO, SrO, BaO, ZnO, HgO, SnO, and PbO in relevant crystal structures. An emphasis is put on the understanding of the effects of chemical composition, crystal structure, and surface orientation on the surface band positions. Slab models for nonpolar surfaces are automatically generated using a proposed algorithm that provides a set of unique nonpolar surface orientations. A non-self-consistent dielectric-dependent hybrid functional approach is employed that is shown to provide a significant improvement in the band-gap, IP, and EA evaluation over standard density functional theory calculations using the generalized gradient approximation. The valence band maximum, O $2s$ band center, and O-site local potential versus the vacuum level are examined for prototypical rocksalt, wurtzite, and zincblende surfaces of selected systems without atomic relaxation. All of these quantities are found to qualitatively follow the tendency in the Madelung potential at the O site, where decreasing interatomic distance results in deeper energy levels. The valence band maxima versus the vacuum level or the IPs after atomic relaxation also show a similar trend even when other cation species and crystal structures are included in the discussion, while there is much less correlation for EAs. An overall trend indicates that lattice volume reflecting cation species is a determinant factor to the IPs of the divalent metal oxides investigated in this paper although there are surface-specific dipole contributions that cause the surface orientation dependence of the IPs.