The answer to 'why is my switch sparking' is that a sparking switch is usually a sign of an electrical problem that requires immediate attention. Sparking can be caused by loose connections, outdated or damaged wiring, or a faulty switch. This is a potentially dangerous situation that should not be ignored, as it increases the risk of electrical fire or shock.
If you notice your switch is sparking, the first step is to turn off power to that circuit at the circuit breaker. Do not attempt to use the switch again until the issue has been properly diagnosed and resolved. Depending on the cause, solutions may involve tightening connections, replacing the switch, or rewiring the circuit. For your safety, it's best to call a licensed electrician to inspect the issue and make any necessary repairs.