We improve the theoretical estimates of the critical exponents for the three-dimensional $\mathrm{XY}$ universality class. We find $\ensuremath{\alpha}=\ensuremath{-}0.0146(8),$ $\ensuremath{\gamma}=1.3177(5),$ $\ensuremath{\nu}=0.67155(27),$ $\ensuremath{\eta}=0.0380(4),$ $\ensuremath{\beta}=0.3485(2),$ and $\ensuremath{\delta}=4.780(2).$ We observe a discrepancy with the most recent experimental estimate of $\ensuremath{\alpha};$ this discrepancy calls for further theoretical and experimental investigations. Our results are obtained by combining Monte Carlo simulations based on finite-size scaling methods, and high-temperature expansions. Two improved models (with suppressed leading scaling corrections) are selected by Monte Carlo computation. The critical exponents are computed from high-temperature expansions specialized to these improved models. By the same technique we determine the coefficients of the small-magnetization expansion of the equation of state. This expansion is extended analytically by means of approximate parametric representations, obtaining the equation of state in the whole critical region. We also determine the specific-heat amplitude ratio.