Magnitudes of strain in ZnO epitaxial layers grown on sapphire(0001) substrates under various growth conditions were experimentally determined by x-ray diffraction. We discuss the strain-induced energy shift on the exciton resonances, the results of which were analyzed theoretically using the Hamiltonian for the valence bands under in-plain biaxial strain. Comparative studies with GaN evidenced the advantages of ZnO in terms of sensitivity of the strain-induced energy shift and of piezoelectric effect in heterostructures.