Near areas with high coastal population, it is generally recommended to wait 72 hours after heavy rain before swimming. This is because runoff from land can carry lots of nasty germs into the ocean. After 72 hours, most of those germs are either dead or have diffused enough to not be an issue.