Phenolic compounds in basil (Ocimum basilicum) plants grown under a controlled environment are reduced due to the absence of ultraviolet (UV) radiation and low photosynthetic photon flux density (PPFD). To characterize the optimal UV-B radiation dose and PPFD for enhancing the synthesis of phenolic compounds in basil plants without yield reduction, green and purple basil plants grown at two PPFDs, 160 and 224 μmol·m−2·s−1, were treated with five UV-B radiation doses including control, 1 h·d−1 for 2 days, 2 h·d−1 for 2 days, 1 h·d−1 for 5 days, and 2 h·d−1 for 5 days. Supplemental UV-B radiation suppressed plant growth and resulted in reduced plant yield, while high PPFD increased plant yield. Shoot fresh weight in green and purple basil plants was 12%–51% and 6%–44% lower, respectively, after UV-B treatments compared to control. Concentrations of anthocyanin, phenolics, and flavonoids in green basil leaves increased under all UV-B treatments by 9%–18%, 28%–126%, and 80%–169%, respectively, and the increase was greater under low PPFD compared to high PPFD. In purple basil plants, concentrations of phenolics and flavonoids increased after 2 h·d−1 UV-B treatments. Among all treatments, 1 h·d−1 for 2 days UV-B radiation under PPFD of 224 μmol·m−2·s−1 was the optimal condition for green basil production under a controlled environment.