Search around for a triac light dimmer circuit. They are all over the internet and it should be straightforward to build one. In addition, you could use a microcontroller and optocoupler such as moc3010 if you want to digitally control it.
It is rather simple, in fact, you could get away without even using a micro though I think that is the easiest. When the triac's gate is activated, the triac will allow current to flow until the current gets below a certain "holding current". In AC lights, that happens 100/120 times per second. So the idea is that if you want it 50% bright, you trigger the triac once half of the sinusoid has elapsed. So you need to have your micro know the phase of the AC signal and use that as one of the micro inputs. You know the frequency/period, so you can compute when to gate the triac.