Why does my LED light flicker when I connect it to a dimmer?
The lamp and the dimmer are not compatible. That is the answer roughly nine times out of ten. An LED lamp draws a small fraction of the current an incandescent did, and most legacy dimmers were designed around a resistive filament load. When the load current falls below what the dimmer needs to keep its triac latched, the triac drops out and re-fires on every half cycle, which you see as flicker, shimmer, or a hard flash at the bottom of the dimming range. This is a listing and compatibility issue, and Section 110.3(B) makes it a code issue too, because it requires listed equipment to be installed and used in accordance with the instructions included in the listing or labeling.
The four causes worth checking first
Minimum load. Read the dimmer label. A common incandescent-only dimmer wants 40 watts or more to hold. Four 9 watt LED lamps put 36 watts on it. Swap to a dimmer with an LED minimum load in the 5 to 10 watt range or add lamps.
Wrong phase-cut type. Leading edge, also called forward phase or triac, works with magnetic low voltage and incandescent. Trailing edge, also called reverse phase or ELV, works with most electronic LED drivers. Putting an electronic driver on a leading edge dimmer produces buzz and flicker. Many quality LED dimmers are selectable, with a small DIP switch or an adjustable low-end trim pot behind the faceplate. Set the low-end trim so the lamp still holds at the bottom of the slider.
No neutral at the box. A two-wire dimmer with no neutral trickles a small current through the load to power its own electronics. On an LED that trickle is enough to make the lamp glow faintly or blink when off. If the box has a neutral, use a three-wire dimmer that lands it.
Mixed lamps. Two brands of LED on one dimmer will often behave worse than either brand alone. Their drivers have different inrush characteristics and different holding currents. Standardize the lamps on the circuit.
Rule out the wiring before you buy parts
A loose neutral or a backstabbed connection produces flicker too, and it does not care whether the load is LED. Check for flicker on other loads on the same circuit or the same leg. Pull the device and torque every termination to the value marked on the device, which 110.14(D) requires you to do with a calibrated tool. Look for a shared neutral on a multiwire branch circuit that lost its common trip. Verify the dimmer is not stacked in a multi-gang box past its derated capacity, because ganging usually costs you a fin and a wattage rating.
Field takeaway
Get the manufacturer compatibility chart for the lamp or fixture, pick a dimmer off that chart, land the neutral if one exists, and set the low-end trim. Section 404.14 requires the switch to be rated for the load it controls, and 110.3(B) requires you to follow the listing, so a compatibility chart is not a suggestion.