You have a combination of a partial blockage somewhere in the drain system combined with something that causes too much water at one time to come through. Since this doesn't happen "all the time", you have to figure out what item(s) trigger the problem. The solution will depend on where the problem is. Water will always flow out of the lowest possible open location, which in your case happens to be the washer drain pipe.
- Washing machine - You can rule this one out since it isn't connected.
- Dishwasher - If this happens only when you run the dishwasher, then the problem is in drain pipe shared between the dishwasher and washing machine. If it happens other times as well then the blockage is farther along.
- Bathtub/shower - If this happens only when you drain a full tub or towards the end of a long shower, then the blockage is in drain pipe shared between the tub/shower and the washing machine drain.
- Sump Pump - This is the one possibility that would be related to recent rain. If you have a sump pump then every time it activates it will pump a large amount of water very quickly (like a dishwasher or washing machine draining) and that would match the pattern your are seeing. If you don't have a sump pump then this probably has nothing to do with the rain.
The most common solution to a drain problem is a snake. The catch is that the snake needs to be long enough to reach through to the blockage. A blockage that only affects one part of the house is likely to be close - often within reach of a 25' handheld snake. But if it is a longer distance to the clog then you will need to either rent a bigger snake or call a plumber who has one (and who knows how to use it). The bigger snakes are a bit tough to handle - I rented one once (and was successful) but usually if it gets to that I call a professional.
There are also chemical and air pressure solutions. They may work but a lot depends on the location and type of blockage. I find that a partial blockage (which it sounds like you have) is easiest to clear with a snake because the chemicals tend to pass a partial blockage without sticking around long enough to clear it.