We report an ab initio study of the electronic properties of surface dangling-bond (SDB) states in hydrogen-terminated Si and Ge nanowires with diameters between 1 and 2 nm, Ge/Si nanowire heterostructures, and Si and Ge (111) surfaces. We find that the charge transition levels e(+/-) of SDB states behave as a common energy reference among Si and Ge wires and Si/Ge heterostructures, at 4.3 +/- 0.1 eV below the vacuum level. Calculations of e(+/-) for isolated atoms indicate that this nearly constant value is a periodic-table atomic property.