Nominally, it's a safety device to discharge the capacitor when your source turns off. In a RF detector circuit, you can vary the size of C and R to set up the rise/fall time characteristics of an envelope detector.
For a rectifier like the circuit you gave, make the R a few kOhms. You'd calculate the value to make sure 1) that you don't burn up the part when you have DC voltage present, and 2) to determine how quickly your storage capacitor will discharge after the source power is disconnected. For matters of user safety, consider the following scenario... the system's power input is unplugged, but there is still energy in the capacitor... stick a screwdriver in the wrong place, and BANG!!! sparks fly, unless you use a bleed off resistor, as shown, to safely discharge the energy in the cap.