Yes to keep your pool water clean and prevent the pool water from becoming contaminated you should run the pool pump when it rains.
When rain water gets into the pool the rain water can introduce contaminants into the water so it can cause the water to turn green etc.
When it rains you should shock the pool water and run the pool filter and pool pump while it's raining to keep the water circulating and prevent the water in the pool from becoming stale.
I always run my swimming pool pump at night and all night and when it rains the swimming pool pump is always on and I always shock the pool water as well.
Doing so keeps the water from turning green or becoming contaminated.