Al0.5Ga0.5N/GaN heterostructures were grown by metalorganic chemical vapor deposition on sapphire substrates. Time-resolved photoluminescence (PL) emission spectroscopy was employed to study the optical properties of these samples. A very strong and broad emission band was observed under high excitation intensity (Io=104W/cm2) and its spectral peak position varies from 3.382 and 3.444 eV (at 10 K) depending on the top AlGaN layer thickness (d). This emission line is related to the recombination between the two-dimensional electron gas (2DEG) and photoexcited holes in Al0.5Ga0.5N/GaN heterostructures. In a sharp contrast to the AlGaAs/GaAs heterostructure system in which the PL emission line associated with the 2DEG is observable only at low temperatures (T<20K), the 2DEG emission line in Al0.5Ga0.5N/GaN heterostructures is observable at temperature as high as 220 K. This is due to the strong piezoelectric polarization and deep triangular potential resulting from the large band offset in high Al content AlGaN/GaN heterostructures. For AlxGa1-xN/GaN (x=0.5) heterostructures with d=110Å, five emission lines were resolved at 10 K at emission energies 70, 97, 126, 157, and 216 meV below the GaN bound exciton peak under a low excitation intensity (10 W/cm2), due to the recombination between the 2DEG electrons in different subbands and photoexcited holes.