Component ratings for sensing AC with microcontroler
Since you are using an opto-coupler it is clear that you are detecting AC frequency or zero crossing as opposed to detecting the sine wave amplitude through each AC cycle. I have devised a simple reliable circuit that I've used in products that keeps the power level down in the AC detection circuit so there is no need for high power components. 



The concept of this circuit is that the current load from the AC line through the opto-coupler is cut off as the AC voltage  pulse amplitude gets too high. Thus the circuit generates two pulses (one at the at the leading edge and one at the trailing flank) for each positive AC voltage pulse. It is easy to use a microcontroller to measure the pulse spacing. Leading edge pulse has a longer spacing since last pulse than the time from leading pulse to trailing pulse.