Solar power overtook coal in the European Union’s electricity production for the first time in 2024, and renewables made up nearly half of the bloc’s energy mix.