Only if your pool pump manufacturer has stated that your pump is rain safe. You can leave it on when it rains for hours or 24 hours, it’s unlikely anything will happen to the equipment if it has excellent waterproofing. However, during a thunderstorm, it is highly recommended that you turn off your pool pump and unplug it. Lightning can cause irreparable damage. Such precautions will prevent costly and irreversible damage to pool equipment.