I've worked with both Joomla and WordPress and both of them have features that allow you to make your site perform very well in the search engines. Also, all of the major search engines are aware of these platforms and have no problems working with them.
My advice would be to choose the package that best fits the kind of site you want to build and ignore the SEO aspect. If your choice helps you build a better website, as long as you pay attention to the basics (few thin content pages, good navigation, good page titles and <meta> description), the other on-site SEO aspects will pretty much take care of themselves.
Wordpress is better in my books. Truth be told I have last used Joomla many years ago, but, when I started using Wordpress (in 2006) I was really impressed with it. It's good for SEO, easy to tweak and incredibly versatile.
I personally don't think that search engine optimizastion differs. You can use wordpress but you can still rank in the middle of nowhere. My advice is to focus on your content rather than the cms but if you have limited time wordpress do have a lot of free plugins which will help on your journey to top.
I agree with Sinan. SEO doesn't appear to rise or diminish based on your choice of WordPress or Joomla. Joomla use seems to be in decline overall but that is not due to any failings it has when it comes to SEO.