Why does holding an electrical switch in between on and off states cause sparks? 
*

*If air is a bad conductor, then why do sparks develop when an
electrical switch is held in between on and off states?

*Why are sparks generated when cables carrying heavy electric current
are brought too close? Is it because the electrons are jumping from
the live cable to the other due to the presence of high voltage?

 A: The switch really has 2 positions: on and off.
However, when you move the switch very slowly, it may leave the closed position slowly. When the switch is just barely open, the field may cause the air to break down and start conducting, to form a spark (as @anna v explained). To rephrase, the reason why sparks happen is because the switch may only be open a tiny amount, not enough to stop current from flowing through the air. If the gap then increases further, the spark may persist because the air is now acting like a conductor rather than an insulator.
Switches are usually designed to prevent this from happening. They have built-in springs that act to open the contacts quickly and completely, thus preventing sparks. However, with many switches, moving the toggle very slowly may cause the contacts to separate a tiny bit, before they fly completely apart. Older designs are likely to suffer more from this.
Switch design is easier for low-voltage switches, because high voltages are more likely to cause the air to break down and cause a spark. It is the voltage that causes electrons to jump across the gap and create the spark. For that reason, high voltage switches are also larger: they have to be large enough to keep the contacts far enough apart when the switch is open. Remember that high enough voltages can cause electrons to jump between clouds and the ground - that's called lightning.
A: Air is a bad conductor up to a certain value of the field generated by charges and the distance between them. After that air breaks down and a discharge happens, i.e. sparks. So below this level charges can accumulate by  rubbing for example , positive ions left on one surface and negative on the other. When brought close a spark occurs.

Why does holding switches in neither off nor on state cause sparks to develop?
  If air is a bad conductor then why do those sparks get developed inside when the switch is in that state?

This is not a well defined question: what type of switches, what type of voltage?

=> Why do sparks get generated when the cables carrying heavy electric current are brought too close?

If you mean high voltage alternating current cables, alternating currents generate electromagnetic radiation in their vicinity.

Is it because the electrons are jumping from the live cable to another due to the presence of high voltage?

No. The electromagnetic radiation from AC high voltage cables can ionize the air and if cables are brought too close, the additive effect of the two radiating wires will reach the break down of the  dielectric field strength of air  and sparks may form. 
A: I think the spark come because the potential difference between the switch gaps tend to be high enough for the air in the gap to ionise and the ion pairs formed(positive ions and electrons).However,just like in modern physics (discharge tube),the p.d z not enough to prevent recombination of the ions and as the ions collide to recombine,a spark z formed.This is the same principle with lightning caused as a result of collision of the oppositely charged clouds
