“How do you know which electromagnetic waves are for what purpose? i.e. sound, photography, microwave.”
Electromagnetic waves exist naturally and are all around us all the time. They don’t have a purpose.
We exploit these waves to do all kinds of things. To do this we need to learn how to (a) make waves with different frequencies, and (b) to detect them.
We learned how to make electromagnetic waves with frequencies between a few thousand oscillations per second and a few hundred thousand oscillations per second in the 19th and early 20th centuries. We called them radio waves.
By sending pulses of radio waves (using morse code and similar) we learned to send text messages long distances almost instantly. Eventually we learned to send more information ‘on’ the radio waves including voices and designed receivers that could detect the radio wave and remove the voice part from the radio wave and so people could ‘listen’ to radio. See the question below for details of how this is done.
More recently we have learned how to broadcast any kind of information using ‘digital’ codes (i.e. sending a stream of ones and zeroes) to affect the radio waves. And so now we have digital radio and television. But these ‘codings’ are just tricks i.e. engineering’ that exploits the properties of particular frequencies of electromagnetic waves to achieve our end
Microwaves are very high frequency radio waves and we developed the technology to use and detect them in the 1940s and 1950s. As we experimented with microwaves and became better at sending and receiving messages we realised that they could be used for mobile telecommunications – fast forward to the iPhone.
We also learned that these waves were strongly absorbed by water and so were suitable for highly efficient cooking and heating processes.