If we want to connect a microcontroller and a triac, do we need to isolate the microcontroller from the triac? Maybe from high voltage? Should there be a transformer in between?
There may be better ways of doing what you are proposing..
But if you want to, you will want isolation, for sure. Now if you are talking about connecting the triac to the DAC output, optical may be out, depending on frequency.
I would prefer a little more info on specs and what you are using the triac for.