In-situ cathodoluminescence (CL) is presented as a technique to optimize GaN, and AlGaN films deposited by MBE using an RF plasma as a source of reactive nitrogen. Excitation of the MBE grown nitride films is conveniently achieved in the preparation chamber using an Auger electron gun. The photoemission is monitored through a side port and dispersed with a 1/8 m monochromator with a typical resolution of 3 nm. The in-situ CL spectra of AlGaN and GaN films provides quick determination of both material composition, doping, and quality from the position and width of the band edge emission. The use of CL for the assessment of material composition in the growth of nitride materials is extremely beneficial since the complementary technique of RHEED oscillations is not routinely observed for these systems. The determination of material quality using CL has been used to optimize growth conditions for GaN PIN junction photovoltaic detectors on (0001) sapphire. Detectors having peak responsivity of 0.175 AAV at the GaN band edge of 365 nm and a UV to visible rejection ratio of greater than 105 have been fabricated. The high rejection ratio is accredited to the reduction of the yellow defect levels in the MBE grown material. Material optimization using in-situ CL for growth of AlGaN MODFETs having drain currents of 425 ma/mm and gm of 66 mS/mm is discussed.