The LED flickers or sometime remain ON in dim even OFF already is cause by a small current leak into the wire. Some of the flickering is cause by the dimmer switch if you install one.
As you know LED using very small consumption. A small current in mA will ON the LED. Flickering is cause by the capacitor charge up enough from the small current leak and light up the led in short time. Than charge again after discharge. How frequent it flickering is depend on how fast it charge and discharge. That capacitor is an AC-DC converter.
Some of the thing that cause it
1) A long wire to the LED will pick up some magnetic field if the switch it on the Neutral side while the Live is always remain in the LED.
2) The neutral line have power (current bleeding) if there is some device running near it. Your electrical appliances.
3) Earth wire also will cause it.
Mine is the normal LED round ceiling lights with no dimmer. I heard sometimes the dimmer is the cause, but since I don't have dimmer, not sure what is causing it.. hmmm...