Control the brightness of light

Dimming an AC light in this way is not easy. Timing is critical.

Unlike DC, it's not just a case of varying the amount of time that the light is on for, but it is a case of chopping and modifying the AC waveform.

It's also quite dangerous playing with mains AC, so I cannot condone this in any way.

You should look at (and thoroughly understand) this site: Voltage Controlled AC Light Dimmer