We use coupled-cluster quantum chemical methods to calculate the energetics of molecular clusters cut out of periodic molecular hydrogen structures that model observed phases of solid hydrogen. The hydrogen structures are obtained from Kohn-Sham density functional theory (DFT) calculations at pressures of 150, 250 and 350 GPa, which are within the pressure range in which phases II, III and IV are found to be stable. The calculated deviations in the DFT energies from the coupled-cluster data are reported for different functionals, and optimized functionals are generated which provide reduced errors. We give recommendations for semi-local and hybrid density functionals that are expected to accurately describe hydrogen at high pressures.