Rain scald is caused by an organism that most people believe lives in the soil although this has not been proved. It enters the skin where there is damage and spreads from there or can be caught from other horses or even just humid, moist, wet conditions. It is highly contagious and you must keep all rugs, tack and grooming equipment used on the affected horse disinfected and away from other horses.
There are a few treatments available, you can ask your vet for what they recommend. It's usually a case of removing the scabs, treating the horse with an antiseptic scrub or if it's really bad antibiotics. Rugging will help keep the horse dry and aid healing. It's important to remember it is an infection not just a case of getting wet. The reason it's called that is because it thrives in moist places, which is why keeping the horse dry is important. Use a lightweight rug so they don't overheat and sweat.