The answer to 'why is my recessed lighting sparking' is that it is likely due to a loose connection or damaged wiring in the lighting fixture. Sparking in recessed lights can be a serious fire hazard, so it's important to address the issue promptly.
Some common causes of sparking recessed lights include loose connections where the light fixture meets the electrical box, damaged or frayed wiring, moisture infiltration, or a problem with the light bulb itself. Symptoms may include flickering, buzzing, or arcing noises coming from the fixture.