The answer to 'why is my light fixture sparking' is that it is likely due to a wiring issue or a faulty light fixture. Sparking in a light fixture can be caused by a short circuit, loose connections, or damaged wiring. This is a serious electrical problem that should be addressed promptly to prevent the risk of fire or electric shock.
If you notice sparking, flickering, or any other unusual behavior with your light fixture, it's best to turn off the power to that circuit at the circuit breaker and avoid using the fixture until it can be inspected and repaired by a licensed electrician. Attempting to fix the issue yourself can be dangerous if you don't have the proper electrical expertise and equipment.