I'm affraid previous posters could be right.
Mains powered constant current LED drivers are not designed to be PWM-ed.
I assume you're using an Uno.
If you're using PWM pin 5 or 6, switch to another PWM pin.
Pin 5 and 6 have a higher PWM frequency than the other PWM pins.
If that doesn't work, try a lower PWM frequency.
Leo..