What do the "optional" resistor and capacitor do in this circuit?
The pin to which that R-C circuit connects to is the LX pin and that pin is connected to the power switches (an NMOS and a PMOS) of this converter, see the block diagram, figure 3 in the datasheet.

To keep the DCDC conversion efficient, these switches switch on/off quite rapidly. That causes the voltage on the LX pin to go up and down with high speed. This steep slopes cause EMI (Electro Magnetic Interference) emissions. So the circuit will radiate RF signals.

That is normal and to be expected and does not have to be an issue depending on your application. If it is an issue a possible solution is to make these steep slopes a bit slower, that's what this RC snubber network does. It might cost some power efficiency though so that's why the circuit is optional.

Another solution could be to place this DCDC converter in a shielded cage (Faraday cage), this can be a small metal cover on the PCB. This is used in nearly all smartphones as the DCDC converters should not disturb the phone's reception.