When installing an ice and water should it should be put on as the roof is being put on so I would recommend doing it before it rains.
The ice and water shield for a roof typically goes only along the overhangs and in the valleys of the roof and not the entire roof.
But if you want to install Ice and water shield over the entire roof then it's okay to do so and you could install it on the roof in the rain to protect the roof.