Reliable predictions of electronic levels, excited-state geometric relaxation, and the relative energies of ground and excited levels to host band edges are of paramount importance for Ce³⁺-doped luminescent materials. By combining the constrained occupancy approach and the hybrid density functional calculation in the framework of a generalized Kohn-Sham formalism, we derived a calculation scheme for the band gap of the host material, the equilibrium configurations of ground-state Ce³⁺ and excited-state (Ce³⁺)*, and their relative energies with respect to host band edges in terms of hole capture or electron ionization for Ce³⁺ in M₂B₅O₉Cl (M=Ca, Sr) charge compensated by Na⁺. The results of first-principles calculations for 4f→5d excitations, Stokes shifts, and the relative position of 5d levels to conduction-band edge agree well with experiments. The moderate computational cost of the present scheme, which can be applied in efficient prediction of the optical properties of many different Ce-doped materials, is of important value in screening potential lanthanide-doped scintillators and phosphors from minimal information about the host crystal structure. Copyright © 2019 American Physical Society.