For World Water Day I am going to explain how to connect your washing machine to a rainwater tank, (see my previous post on how to set up a rainwater tank). WHY do this? Answer = because your washing machine needs about 50 litres of water (5 buckets) for every load, this water does need to be clean but it does NOT need to be drinking water standard. Providing rainwater is filtered correctly this is safe to use in your washing machine. In order to connect a washing machine to a rainwater tank, to make use of rain for washing clothes, a few things need to be considered first:
 Your washing machine is expecting water to be available at normal main network water pressure. If the water pressure is too low or the flow of water is too sluggish then the machine may fail to start. This can happen if your tank is too far away, or the tank is nearly empty. Valves and bends in the pipework cause additional pressure loss, so don't be surprised if the washing machine is dry as a bone, despite having a full water tank 10 metres away in your little project. Normal mains pressure varies widely, it depends where you live in relation to the network pumping station. In the UK it is commonly 1 to 3.5 bar, although it can be up to 10 bar. In continental Europe, water pressure above 3.5 bar is more common. Now you're thinking -what is 3.5 bar anyway? -this is the same pressure you get from a tap that takes water from a tank 35 m higher than the tap (1 bar = 10 metre head height between the tank level and the tap). So if you have a very hilly site you can get creative to achieve this, but for everyone else, a pump is required. When you rig up your system, note that valves and bends in the pipework cause additional pressure loss, so it is possible to have the washing machine is dry as a bone, despite having a full water tank 10 paces away if your pump is too weak. Height is king! No height means no water pressure, regardless of how large the rain tank is.
 The machine is intended to handle mains network water. This is high quality, drinking standard water. However it is perfectly safe for rainwater to be used as a substitute for washing clothes providing that air pollution is not a major problem (acid rain and smog are no longer a problem in the UK) -and- that the collected water is well filtered to remove debris.
So in order to get water from your rainwater storage tank to the washing machine, you will probably need a pump. (The small exception to this is if the tank is higher than the washing machine, e.g. your tank is on the ground floor and your washing machine is in the basement.) I recommend using a power shower booster pump for this purpose as these are already fitted with a pressure sensor that will control the pump operation automatically. As an initial guess you will probably need a pump with the capability to deliver 12 litres/min at 3.5bar, but the automatic control is also important as the washing machine will draw water in stops and starts.
The power shower pump will automatically switch on when the washing machine starts and automatically switch off when the washing machine stops drawing water. This should provide adequate pressure to ensure the water flow reaches the washing machine. (The more bends and connections and the smaller the pipe diameter and the higher the washing machine, all increase the work load or pressure head demand on the pump).
These shower pumps (like this one) are connected to the supply lines normally for both hot and cold connections. You will need to join the two inlets together so that they both accept cold rainwater. The same will need to be done to the two outlet lines, to create one out-going line.
(Click and zoom to see my sketch of the whole setup more clearly...)
The rainwater tank should include mesh filters to remove debris and an auto mains refill float valve (see my previous post on this). It is also possible to collect the drainage water expelled from the washing machine if you live in a particularly drought prone area (like England! Yes, we have droughts too!). You can use this to:
[a] water the garden -make sure you use biodegradable laundry soap! I recommend soda crystals or ECOballs. Actually you can get away WITHOUT using washing powder at all with a normal load. Modern machines are so good, the spinning action is the main thing that cleans the clothes. This really is the greenest option. Maybe save the laundry powder for just sports kit? Don't water crops directly with the waste water, make sure you direct the water onto the soil only and vary which part of the garden you water. If your plants start to look worse then use the no soap option.
[b] reuse water from the second wash or rinse cycle to feed back into the first cycle of a second laundry load. This involves manually setting up a bucket to collect drainage water and manually pouring this into the rainwater storage tank for reuse. You will need to time the washing machine to work out how long this takes to finish each cycle, to get the hang of this.
Most washing machines are designed to pump drainage water back up to worktop height to ensure the drainage water is properly expelled from the machine, therefore the drain pipeline does not have to be right down at floor level to do its job. Fitting a WATER TWO drainage valve in the drainage pipeline from the washing machine can be really useful for both of the above tasks, to avoid the need to lift the flexible drainage hose out of the fixed drainage pipe and risk water spilling everywhere whilst you direct it into the bucket. It's OK to arrange the drainage line so that there is enough room to fit a bucket underneath the drainage pipe next to the washing machine with a T junction.