If some of your links go to the URL http://yoursite.com, and the rest go to http://www.yoursite.com/, your link popularity gets divided among these two URLs - thus affecting the pagerank as well as the ranking for that URL. So, it is better to pick the URL that you want and use it consistently across your entire website, as well as for your incoming links. One cannot, however, control how other sites would link to his website. So you have to inform Google which URL you prefer to be canonical. Google calls Canonicalization as the process for picking the best URL when there are many alternatives.
‘Google Sitemaps’ offers an option to select a canonical URL for your site. Another way to achieve canonicalization is by adding a 301 redirect (permanent redirect). So, if you want your default URL to be the www version, then you can 301 redirect your non-www version to the www version. Having a single, canonical version of every URL on your site will improve your site rankings as well as the pagerank.