β-LiGaO2 with an orthorhombic wurtzite-derived structure is a candidate ultrawide direct-bandgap semiconductor. In this work, using the non-adiabatic Allen-Heine-Cardona approach, we investigate the bandgap renormalization arising from electron-phonon coupling. We find a sizable zero-point motion correction of -0.362 eV to the gap at Γ, which is dominated by the contributions of long-wavelength longitudinal optical phonons. The bandgap of β-LiGaO2 decreases monotonically with increasing temperature. We investigate the optical spectra by comparing the model Bethe-Salpether equation method with the independent-particle approximation. The calculated optical spectra including electron-hole interactions exhibit strong excitonic effects, in qualitative agreement with experiment. The contributing interband transitions and the binding energy for the excitonic states are analyzed.