We present first-principles calculations of the electronic structure of BiVO4 at various levels of theory. In the calculations, we take into account a series of effects that affect the band gap, i.e., spin-orbit coupling, electron-hole interaction, nuclear quantum motions, and thermal vibrations. All these effects lead to a significant renormalization of the band gap. After including the relevant corrections, the values achieved with the GW level of theory closely match the experiment. Additionally, by treating excitonic effects through the Bethe-Salpeter equation, we obtain an optical band gap and an absorption spectrum in good agreement with experimental data. Through the calculation of Tauc plots, we show that this technique gives the optical band gap within about 0.14 eV, but argue that it is unable to distinguish between direct and indirect bad gaps in the case of BiVO4.