It is shown that compressively strained polar Al x Ga 1−x N/Al y Ga 1−y N quantum wells (QWs) of various contents grown on virtual Al Y Ga 1−Y N substrates (Y=20, 40, 60, 80, and 100%) are able to cover the whole UV-A, -B, and -C spectral range but their contents and widths have to be carefully optimized if they are to be used as the active region of light emitting diodes and laser diodes. The emission wavelength from AlGaN multi QWs can be tuned by both the QW width and barrier thickness, but the range of QW width for which an efficient luminescence is expected is very small (2-4 nm) due to a very weak electron-hole overlap for wider QWs. The most effective method for wavelength tuning in this QW system is content engineering, i.e., lowering Al concentration in the QW region. The decrease of Al concentration in the QW shifts the emission peak to red, broadens this peak, weakens its intensity, and changes its polarization from transverse magnetic (TM) to TM mixed with transverse electric (TE). For laser diodes the optimal QW design is more rigorous concerning the QW width since this width should be below 3 nm. Moreover it is shown that the TE and TM mode of materials gain overlap and are strongly blueshifted in comparison to emission spectrum.