Hi,
Figuring you have a MOC3020 opto-coupler the maximum reverse voltage according to the datasheet is 3V so it's possible it got damaged by connecting them backwards. But instead of having the diode in series like you have it now place it anti-parallell with the opto-coupler LED. Then it will clamp the reverse voltage to ~0.7V and the series resistor will limit the current.

As you have it now..... Figuring 5V output from the PIC, 0.7V drop across your series diode, 1.15V drop across the LED we have 5-0.7-1.15=3.25V left across the 1k resistor. This yields a forward current thru the LED of 3.25mA. Although this should work as long as the "firing pulse" thru the LED is at least ~6us or so it just "feels" a bit low to me. Why not simply try with a 330ohm resistor or something?

Now, if you have another optocoupler then obviosuly the above numbers may not be correct but it might be worth looking into it for your particular device then.

/Henrik.