In our daily life a lot of photons of visible light, infrared and radio etc move around us. We know that light is an electromagnetic radiation. So why doesn't that electromagnetic radiation affect a magnetic compass?
[Physics] Why doesn’t light affect a compass
electromagnetic-radiationmagnetic fieldsparticle-physicsphotonsvisible-light
Related Solutions
If you're looking at radio waves then the mirror will have to be made of thicker metal, because as you increase the wavelength you also have to increase the thickness of the metal to get the same reflectivity. That's actually how satellite dishes work. They're basically a big curved mirror that concentrates all of the microwaves coming down from the satellite. They're often full of holes to keep the weight down, and this doesn't matter because the wavelength of the waves is larger than the holes. This is the same principle as seeing a light on in your microwave. You can see the light escaping through the door but the microwaves aren't escaping because they're too long. Once you get beyond visible light into the shorter wavelengths; ultraviolet light is easy to make mirrors for, but x-rays are very difficult. And so making x-ray telescopes is very difficult. Sometimes they do it by using a bag of gas to act like a lens rather than mirrors or by using a metal mirror but at a very grazing angle which makes the mirror very large. Mobile phone waves are at the microwave end of radio waves, and a sheet of aluminium would work nicely as a mirror for those.
Source : the naked scientists
One can see that for making lenses, materials of different refractive indices can be used based on required convergence, divervence and dimensions can be compared to those of the above described mirrors, Although there may a problem that making enormous lenses for radio waves require materials/machinery that we may not have at the moment, mirror though as you see are the big satellite dishes that we have seen many times.
In microwave ovens what matters is how much energy the radiation carries and how that energy is absorbed by the food. Visible light and IR are rapidly absorbed by most foods, so they would only heat the outer layer of the food. You'd get food with the outside carbonised and the inside raw.
Microwaves are far less strongly absorbed by foods, so they penetrate deep into the food and can heat the interior. Even so large objects won't be heated throughout, which is one reason why microwave cooking instructions frequently advise a multi stage process of heating, letting the food stand then heating a final time.
Microwave ovens often include IR heating as well as the microwave heating. This is done so you get food with a browned exterior and heated throughout.
The answers to Why do microwave ovens use radiation with such long wavelength? give a nice discussion of why the exact wavelength used was chosen. The frequencies commonly used in microwave ovens are 2.45 GHz (12 cm) for home ovens and 915 MHz (38 cm) for industrial overs. Much higher frequencies are not used due to the cost of the magnetron, while much lower frequencies would not work because the wavelengths would be too big to allow a half wavelength to fit in the oven.
Finally, you say:
Why do we use microwaves in microwave oven when infrared and visible light are much hotter and how do microwaves cook food when they are cooler than visible light and others.
But this is a slight misunderstanding. The wavelength of light emitted is indeed related to the temperature of the source, but light itself doesn't really have a temperature in the sense that matter does. Light transfers energy, and if this energy is absorbed it will heat the food. However the amount of heating is just related to the intensity of the EM radiation and the abosrption cross section. The wavelength makes a difference only insofar as it affects the absorption cross section.
Best Answer
Most electromagnetic radiation is of very high frequency - the magnetic field changes many times per second. This means that the compass just doesn't have time to "follow" the magnetic field changes.
The only thing that does affect a compass is a DC magnetic field - usually this is a large piece of iron etc. that gets magnetized (e.g. by the earth's magnetic field) and thus causes distortion; or it can be a DC current loop of some kind.
But even the low frequencies of the mains (50 or 60 Hz depending on where you live) are much too fast to affect the compass (although in the presence of a strong source of electromagnetism, such as a large transformer, you can see vibration in the needle as observed by @vsz). Radio starts in the kHz (for long wave) to MHz (FM) or GHz (WiFi etc). And light, with wavelengths around 500 nm and a speed of 3x10$^8$ m/s, has frequencies in the hundreds of THz range. Too fast.
UPDATE - adding a bit of math(s):
A compass in the earth's field can be thought of as a damped oscillator: on the one hand there's the torque on the needle that is proportional to the displacement from magnetic North, on the other there's the inertia of the needle; and finally, there are damping terms (a good compass is critically damped - meaning that the damping is such that it will go to the right position in the shortest time). We can write the equation of motion as
$$I\ddot\theta + \mu\dot\theta + k\theta = 0$$
In this expression, $\mu$ is the damping term (proportional to the angular velocity) and $k$ is the factor that describes how much torque the needle experiences with displacement.
This is a general equation for a Simple Harmonic Oscillator (SHO), and we typically recognize three regimes: lightly damped, heavily damped, and critically damped.
How such an oscillator responds when you give it a displacement and then let it go depends on the kind of damping - see this graph:
In particular, the critically damped oscillator converges to its equilibrium position as fast as possible - which is why it's preferable for things like a compass.
Now when you drive a SHO with an oscillating force, you get a response that depends on the frequency of the drive signal and the natural frequency of the system. If you drive at the natural frequency, you get resonance and the amplitude becomes large; as the difference in frequency gets larger, the amplitude of the response gets smaller. For a lightly damped (or underdamped) system*, the amplitude response is given by
$$A = \frac{s_0}{\sqrt{\left[1-\left(\frac{\omega_d}{\omega_0}\right)^2\right]^2 +\left[\frac{\omega_d/\omega_0}{Q}\right]^2}}$$
In the limit of large frequencies, the response scales with
$$A \propto \left(\frac{\omega_0}{\omega_d}\right)^2$$
where $\omega_0$ is the natural frequency $\sqrt{\frac{k}{I}}$ and $\omega_d$ is the driving frequency. When the driving frequency is many orders of magnitude larger than the natural frequency, the amplitude response will be negligible.
As was pointed out in a comment by MSalters, at extremely high frequencies (above 10 GHz) the wavelength of the EM radiation becomes short compared to the length of the compass needle, so the above is further complicated by the fact that different parts of the needle will experience forces in different directions. All of which points in the same direction: the needle won't move.
* I am taking the easy way out here... did not find the expression for the critically damped driven oscillator and don't have the intestinal fortitude to derive it right now and trust myself to get it right. But this is 'directionally correct' even for critically damped oscillator