However depending on the server configuration, they could point to different locations, so search engines can’t assume they’re the same. The folks at Sitemaps have a helpful article on this, albeit a bit technical for some.
Matt Cutts, the “Google Guy has a simple suggestion on his Google Blog: “The only thing I’d add to that answer is one recommendation: check your internal links and to make sure that they’re consistent (either all to www or all to non-www). That will also help search engines pick the root page that you prefer.”
In other words, pick one or the other (I like using the www) and make sure all the internal links on your web site — and as many incoming links from other web sites as you can influence — all use the same version. That way your web site will get proper credit for all those links.