Question: what determines the frequency of an electromagnetic wave?
Answer: Electromagnetic waves exist from 0.00001 Hz up to 1000's of terahertz, and probably waves beyond even these limits. Electromagnetic waves are generated by accelerating (or oscillating) charges. The frequency of the wave simply depends on how fast the charge is oscillating.