R4 & C1 together form a snubber network. It's purpose is to limit the DV/DT presented to the triac. If this parameter is not controlled properly, it can cause commutation where the triac very quickly switches state every half cycle. This action causes the triac to heat very quickly and can destroy it. Also half cycling into an inductive load, like a transformer, or in your case a lighting ballast, effectively looks like feeding it with D.C rather than the A.C it was designed for, again with the detrimental effect of rapid heating and possibly damaging the windings.
rgds