PaulUK, all LEDs have an exceptionally low reverse voltage. It's is usually specified around a few volts in the data sheets. D2 clamps the reverse voltage over the LED to D2's forward voltage (0.5 - 0.8 V). As usual, the data sheet specs are minimum ratings so you may get away with not respecting them perfectly but it won't help reliability, especially if you subject them to more than 300 volts, this might terminate them within a few milliseconds. ;-)

Question: How about safety? Usually, the LEDs' innards are molded in a plastic (epoxy) case with the leads sometimes just barely enclosed, especially with the small 3mm LEDs. OK, you got a series resistor but using them in what looks like metal holders (see Rodalcos nice box) could open a way for the electrons to leak out. Even worse, if they can't roam freely because the metal holder is mounted on a plastic board, they might collect and get nasty...

Also watch out for the maximum voltage across the resistors, and their dissipation rating. Metal film resistors don't like either of these ratings exceeded. Again, it will work for some time but it might not fulfill your expectations. The old carbon resistors are much more tolerant here.

For the LED, use a low-current (2-5 mA) type. The 2 x 39k will produce a peak current of 4 mA (Formula: [230V times square root of 2 for peak voltage, 325V] divided by [2 * 39k]) while the average current over time is just 230V / 78k halved (because only one half of the sine is used), or 1.5 mA.

Also note that the LED is only lit part-time (at AC's 50 or 60 Hz), this might cause noticeable/objectionable flickering as the LED does not (or should not) have the thermal inertia of an incandescent bulb (neither does the neon in Haligan's original post).