We show that fundamental gaps and optical spectra of molecular solids can be predicted quantitatively and nonempirically within the framework of time-dependent density functional theory (TDDFT) using the recently developed optimally tuned screened range-separated hybrid (OT-SRSH) functional approach. In this scheme, the electronic structure of the gas-phase molecule is determined by optimal tuning of the range-separation parameter in a range-separated hybrid functional. Screening and polarization in the solid state are taken into account by adding long-range dielectric screening to the functional form, with the modified functional used to perform self-consistent periodic boundary calculations for the crystalline solid. We provide a comprehensive benchmark for the accuracy of our approach by considering the X23 set of molecular solids and comparing results obtained from TDDFT with those obtained from many-body perturbation theory in the GW-BSE approximation. We additionally compare results obtained from dielectric screening computed within the random-phase approximation to those obtained from the computationally more efficient many-body dispersion approach and find that this influences the fundamental gap but has little effect on the optical spectra. Our approach is therefore robust and can be used for studies of molecular solids that are typically beyond the reach of computationally more intensive methods