It really depends on the trails.
Some trails have loose soil and great drainage and can be ridden during or immediately after rain/snow. Some sandy trails I ride are better during or after a nice rain.
Other trails in low lying areas with poor drainage and compacted soil might not be ready to ride for 3-4 days after heavy rain.
Each trail is different and it boils down to how much impact you are willing to induce. if you have a few different types of local trails, you should know which ones to stay off and which ones are ok.