LED light dimming, TRIAC vs PWM?
In ac circuits, you can't use PWM similar to DC. In ac you need to do a phase control which involves identification of zero crossings in ac sine wave and then accordingly firing up a triac after a delay.

In most cases, there is some circuitry (capacitors, inductors, diodes etc) inside the LED bulb which will interfere with the phase controlled signal generated by the triac and thus you won't get expected results.

If however you have a lamp that uses an external DC adapter for powering up, there is a good chance that you will be able to implement direct PWM on that supply voltage. To do an initial check, try to reduce the voltage and see if brightness is decreasing.

Once you have verified this, you can use a mosfet to generate a PWM on adapter supplied DC voltage. You can use an arduino to generate the PWM.