Heavy rain has hit Western Australia, leaving communities stranded and hundreds of people needing evacuation.