When deriving Planck's law, the setting is that photons at all frequencies are in a thermal equilibrium. This is not a small assumption, although it is more or less valid for various macroscopic objects.
For such a thermal equilibrium to be possible, there has to be a black body, an object that can absorb and emit all frequencies. Ideally, a black body should have a continuous spectrum of energy levels, as the frequency of a photon can be any real number.
The black body being at a higher temperature means that there are more total energy available in the system and it becomes easier to emit photons with higher energy. It is certainly not in disagreement with the fact that radiation originates from transition of electrons between energy levels, as the black body assumption implies that there is a continuous spectrum.
From what I have described so far, it is obvious that we cannot use a dilute gas of hydrogen atoms (assuming that the temperature is low enough so that ionization is practically impossible) to generate a black body radiation. This system can equilibrate only with photons with frequencies corresponding to the spectral line of the atomic hydrogen.