We correlate structure analyzed by transmission electron microscopy with photo-and cathodoluminescence studies of GaN/Al2O3(0001) and GaN/SiC(0001) and show that an additional UV line at 364nm/3.4eV can be connected to the occurrence of stacking faults. We explain the occurrence of this line by a model that is based on the concept of excitons bound to stacking faults that form a quantum well of cubic material in the wurtzite lattice of the layer material. The model is in reasonable agreement with the experimental observations.