There are a number of ways of generating radio waves. The simple acceleration of electrons in a transmitting dipole will generate radio waves. I guess as you might have been using wi-fi to write your question, you knew this and are more concerned with "natural" sources of radio waves? Basically, electromagnetic radiation of all wavelengths can be produced by bound-bound, free-bound or free-free transitions of electrons that may be bound in atoms or molecules. Where bound electrons are involved, then it is typically the spacings between molecular rotational and vibrational levels that are responsible for infrared emission. Longer wavelength bound-bound transitions can occur between hyperfine transitions with small energy differences. e.g. The famous 21cm radiation comes from a hyperfine transition in hydrogen atoms. The are also a number of mechanisms involving the acceleration of unbound electrons that produce continuum emission at long wavelengths. The most commonly occurring are bremsstrahlung which can produce all wavelengths down to a short wavelength roll-off that depends on the gas temperature; and synchrotron continua that are produced by electrons spiralling at relativistic velocities in magnetic fields.