Forum
There are several reasons of why should we redirect non www urls to www or from www to non www url.
Preventing to have two different websites
http://example.com & http://www.example.com will be considered as two different websites even though they serve the same content or they both are actual the same website.
For your information, www is actually a sub domain.
Prevent content duplication which may cause search engine penalty
Imagine that you have not implemented 301 redirect from non-www to www, then suppose people link to a page on your site using non-www and www at the same time from different places... then search engines can get confused as to which URL to throw into their index and since they have 2 URLs with the same content on your site they will see it as duplicate content.
For your information, content duplication may cause your website penalized.
Prevent different Google pagerank
Your PageRank will be spilled over two different versions instead of preserving the link juice just on one version.
Prevent different backlinks counts
Your backlinks can be spilled over two different versions
If your web server is Apache, here is how to set this up
http://forum.xhanch.com/index.php/topic,175.0.html