The rain sensor allows the irrigation system know if there has been adequate rain to temporarily forgo watering your lawn.
These sensors are available at Lowes for about $18
https://www.lowes.com/pd/Orbit-White...Sensor/1043275
The two wires to your existing are cut and this new one spliced in. This is an easy DYI. The biggest risk is being up on the ladder to do the work, as the sensor is usually attached to the gutter at the roof line right outside the irrigation system location.