A series of hot days has ended with heavy rain bringing flash flooding to parts of Sydney.