In the present study, we combine theoretical and experimental approaches in order to gain insight into the electronic properties of both the high-temperature, rutile (metallic) and low-temperature, body-centered tetragonal (insulating) phase of niobium dioxide (NbO2) as well as the optical properties of the low-temperature phase. Theoretical calculations performed at the level of the local density approximation, Hubbard U correction, and hybrid functional are complemented with the spectroscopic ellipsometry (SE) of epitaxial films grown by molecular beam epitaxy. For the rutile phase, the local density approximation (LDA) gives the best description and predicts Fermi surface nesting consistent with wave vectors that lead to niobium-niobium dimerization during the phase transition. For the insulating phase, LDA provides a good quantitative description of the lattice, but only a qualitative description for the band gap. Including a Hubbard U correction opens the band gap at the expense of correctly describing the valence band and lattice of both phases. The hybrid functional slightly overestimates the band gap. Ellipsometric measurement is consistent with insulating behavior with a 1.0 eV band gap. Comparison with the theoretical dielectric functions, obtained utilizing a scissors operator to adjust the LDA band gap to reproduce the ellipsometry data, allows for identification of the SE peak features.