First principles calculations of rare earth (RE)-doped LaSi3N5 host lattice are performed to obtain the electronic structure, the band gap (BG), and the character of electronic transitions. Doping with both trivalent and bivalent RE cations is inspected. RE 4f states form two bands of occupied and unoccupied states separated by ~5 eV. In RE3+-doped compounds 4f states are shifted by ~6 eV to more negative energies compared with RE2+-compounds. This stabilization causes that RE3+ 4f bands are in a different position relative to the valence band and the conduction band than RE2+ 4f bands and therefore different electronic transitions apply. BG of RE3+-compounds decreases from ~4.6 eV (Ce) to ~0.5 eV (Eu). Except for Ce3+, exhibiting the 4f-5d transition, other RE3+-compounds show the charge transfer of the p - 4f character. BG of RE2+-compounds increases from ~0.80 eV (Ce, Pr) to ~0.95 eV (Nd, Pm), ~1.43 eV (Sm), and ~3.28 eV (Eu) and the electronic transition is of the 4f-5d character. The energy level scheme constructed from ab initio calculated electronic structures agrees well with the experimental energy level diagram. The agreement demonstrates the reliability of the hybrid functional HSE06 to describe correctly bands of nonbonding RE 4f electrons.