We have investigated the temperature dependence of the dielectric functions of a high- superconducting YBa2Cu3O7− (Y-123) and a nonsuperconducting PrBa2Cu3O7− (Pr-123) thin film using spectral ellipsometry. We evaluate the data by means of thermal-difference and sum-rule analysis techniques. We find that a spectral-weight transfer into the bands between 4 and 5 eV takes place before Y-123 becomes superconducting. We identify an anomaly around 1 eV that can be explained by a sudden plasma-frequency drop of the order of an meV around . The absence of any sudden effects in the dielectric properties of Pr-123 suggests that both observations are intimately related to the superconducting state. Our findings point out that high-energy degrees of freedom must be considered for the understanding of high-temperature superconductivity.