In this paper we present a theoretical investigation of space separated electron and hole distributions, which is reflected in self-consistent solving Schrödinger equations for electrons and holes and Poisson equation. The results are illustrated for the GaN/Al0.3Ga0.7N quantum well. The optical gain spectrum in -oriented GaN/Al0.3Ga0.7N quantum well in the ultraviolet region was calculated. It is found, that both the matrix elements of optical transitions from the heavy hole band and optical gain spectrum have only the strict x (or y) light polarizations. We present studies of the influence of wave functions confinement on optical gain which is observed with an implicit dependence on the built-in electric field which is calculated to be 2.3 MV/cm. Whereas structures with narrow well widths exhibit the usual dependent developing of the light gain maximum almost without shifting spectral region, a significant blueshift of the gain maximum is found with increasing plasma density for wider quantum wells. This blueshift is ascribed to the interplay between the screening of a strain induced piezoelectric field and bandstructure. A large Sommerfeld or Coulomb enhancement is present in the quantum well.