you can use MOC30xx series optio isolators to drive your triac through microcontrollers. you can find lots of application circuits driving AC motors, AC lamps for light intensity control etc.
Please see following links for application circuits:
to make an AC dimmer you need to sense the phase of AC voltage and need to synchronize the firing of your triac with zero-crossing of AC waveform.
Hope this helps