BexMgyZn1−x−yO semiconductor solid solutions are attractive for UV optoelectronics and electronic devices owing to their wide bandgap and capability of lattice-matching to ZnO. In this work, a combined experimental and theoretical study of lattice parameters, bandgaps, and underlying electronic properties, such as changes in band edge wavefunctions in BexMgyZn1−x−yO thin films, is carried out. Theoretical ab initio calculations predicting structural and electronic properties for the whole compositional range of materials are compared with experimental measurements from samples grown by plasma assisted molecular beam epitaxy on (0001) sapphire substrates. The measured a and c lattice parameters for the quaternary alloys BexMgyZn1−x with x = 0−0.19 and y = 0–0.52 are within 1%–2% of those calculated using generalized gradient approximation to the density functional theory. Additionally, composition independent ternary BeZnO and MgZnO bowing parameters were determined for a and c lattice parameters and the bandgap. The electronic properties were calculated using exchange tuned Heyd-Scuseria-Ernzerhof hybrid functional. The measured optical bandgaps of the quaternary alloys are in good agreement with those predicted by the theory. Strong localization of band edge wavefunctions near oxygen atoms for BeMgZnO alloy in comparison to the bulk ZnO is consistent with large Be-related bandgap bowing of BeZnO and BeMgZnO (6.94 eV). The results in aggregate show that precise control over lattice parameters by tuning the quaternary composition would allow strain control in BexMgyZn1−x−yO/ZnO heterostructures with possibility to achieve both compressive and tensile strain, where the latter supports formation of two-dimensional electron gas at the interface.