What is the purpose of an RC branch accros the diode of a rectifer circuit?
It is a snubber network.

Its purpose is to suppress high frequency ringing at the turn-off of the rectifier diode, caused by resonance between the diode capacitance and the flyback transformer leakage inductance. This is necessary not only for EMI purposes but to protect the device from excessive voltage stress.

The snubber won't have a meaningful impact on the output, since it's only 'working' on the edge of the pulse train coming in.

The values can be estimated by calculation, but the ringing driving sources are parasitic in nature so by and large they're empirically determined (measure ringing frequency, set values, measure, adjust values, measure again, etc.)

Here are some app notes that touch on the topic:


Fairchild app note AN-6093
Switching Power Magazine article on flyback snubbers