IchVerloren, welcome to Physics SE!
The thing isn't temperature changing the electromagnetic field. In its most fundamental form, temperature $T$ is the relationship between lack of information (entropy $S$) and total energy $U$:
\begin{equation}
\frac{1}{T}=\frac{\partial S}{\partial U}.
\end{equation}
It is a statistical parameter that measures the spread of your energy over the degrees of freedom of the system. Loosely speaking, that equation means that the higher the temperature, the less new degrees of freedom have to be excited for me to increase the system's energy in a thermodynamically consistent way (with lower energy states being occupied first, in a proportion known as the Boltzmann distribution).
Now, consider the electromagnetic field as our system. It can have excitations, and therefore, have energy. We can define a temperature for anything with energy. The degrees of freedom of the EM field are precisely its modes of vibration. As such, the temperature is related to how many of these modes are occupied. Since lower energy modes need to be more excited at lower temperatures, and experiment tells us that lower frequencies dominate at low temperatures, we can postulate a direct relationship between energy resolution (energy of a single excitation) $E$ and mode frequency $\nu$ as
$$E=h\nu,$$
which is quite ad-hoc but can be made quite rigorous with in depth thermodynamic arguments. For the electromagnetic field to have temperature, it needs blackbody radiation.
But maybe you were interested in where this radiation comes from. Well, roughly speaking, electrons in materials also have statistical thermal distributions, and to maintain thermal equilibrium they are constantly being excited and dropping energy levels. This energy shifting is done through EM radiation (seeing electrons are charged particles) and has the blackbody spectrum.