Five gallon buckets are already being used all over the third world in water filtration applications. A cheap, simple system that can be put together with local materials is the biosand filter. This type of filter has been shown to remove 90-99.9% of disease spreading contaminants and a large proportion of heavy metals from the water processed through the system.
Other third world water filtration systems such as chlorination and solar disinfection are more expensive and less effective.
You can build your own five gallon bucket bio sand filtration system with a few five gallon buckets and some PVC pipe. Detailed instructions on a five gallon bucket based bio sand filtration unit are found on this ten page bucket filter pdf. For more information about the bio sand filtration process, read the BioSand Filter Wikipedia page or this extremely detailed 130 page biofiltration manual put out by the Center of Affordable Water and Sanitation Technology.
If you don’t mind spending a little bit more on an easier to build and better filtration system, you can build your own Berkey-style filter out of five gallon buckets, which will save you over 100$ over buying the full Berkey unit. (see price for the full berkey unit vs price for just the filter set.) With the ceramic add-on to the Berkey filter, you can even filter flouride out of your tap water.
Here’s a video from a guy who used the Berkey replacement filters mentioned above to make a home made water filter that works just as well as the expensive version!