The magnetic field of the Earth can interact with the charged particles that make up the solar wind, which is a stream of plasma (charged particles) ejected from the Sun. When these charged particles interact with the Earth's magnetic field, they can be deflected or trapped in the Van Allen radiation belts, which are regions of charged particles that are held in place by the Earth's magnetic field.
The interaction between the solar wind and the Earth's magnetic field can result in a transfer of energy and momentum from the solar wind to the Earth's magnetosphere. This can cause phenomena such as auroras and geomagnetic storms.
However, not all of the energy from the solar wind is able to penetrate the Earth's magnetic field and reach the surface of the Earth. Some of the charged particles in the solar wind are deflected or absorbed by the magnetic field before they can reach the Earth's surface. This is why the Earth's magnetic field can block some of the solar energy, while allowing some of it to pass through and interact with the Earth's atmosphere.
Additionally, the Sun emits energy in various forms, including light and other forms of electromagnetic radiation. While the Earth's magnetic field can block some of the charged particles in the solar wind, it has no effect on these forms of radiation, which can reach the Earth's surface and provide energy for photosynthesis, heating, and other processes.