Recent technological advancement in ZnO heterostructures has expanded the possibility of device functionalities to various kinds of applications. In order to extract novel device functionalities in the heterostructures, one needs to fabricate high quality films and interfaces with minimal impurities, defects, and disorder. With employing molecular-beam epitaxy and single crystal ZnO substrates, the density of residual impurities and defects can be drastically reduced and the optical and electrical properties have been dramatically improved for the ZnO films and heterostructures with MgxZn1-xO. Here, we overview such recent technological advancement from various aspects of application. Towards optoelectronic devices such as a light emitter and a photodetector in an ultraviolet region, the development of p-type ZnO and the fabrication of excellent Schottky contact, respectively, have been subjected to intensive studies for years. For the former, the fine tuning of the growth conditions to make MgxZn1-xO as intrinsic as possible has opened the possibilities of making p-type MgxZn1-xO through NH3 doping method. For the latter, conducting and transparent polymer films spin-coated on MgxZn1-xO was shown to give almost ideal Schottky junctions. The wavelength-selective detection can be realized with varying the Mg content. From the viewpoint of electronic devices, two-dimensional electrons confined at the MgxZn1-xO/ZnO interfaces are promising candidate for quantum devices because of high electron mobility and strong electron-electron correlation effect. These wonderful features and tremendous opportunities in ZnO-based heterostructures make this system unique and promising in oxide electronics and will lead to new quantum functionalities in optoelectronic devices and electronic applications with lower energy consumption and high performance.