Question: what determines the frequency of an electromagnetic radiation?
Answer: Electromagnetic waves are generated by accelerating (or oscillating) charges. The frequency of the wave simply depends on how fast the charge is oscillating.