SEO consists of many different points on and off page. Looking for further methods to increase rankings, many have turned to the theory that validated to the W3C standard helps with Google rankings.
The W3C (World Wide Web Consortium) was started in the early 90’s as an international community where members, full-time staff and the general public work together to develop better web protocols. These protocols include things like website code and cascading style sheets (CSS).
From my experience, websites that validate don’t necessary rank better in Google. This is because Google has well over 100 on-page factors and many sites that don’t adhere to good W3C standards still rank well. Check out this video by Matt Cutts (it’s a little old but he raises some good points from 2 minutes 50 seconds about code validation and rankings).
But in an indirect way, website code does have an impact on Google rankings, for example, back in early 2010 it was announced that a websites load time will play a part in the Google algorithm update, Caffeine. After testing this theory, I stripping some HTML code away from an old website to make it load faster and it DID improve the rankings by 2 positions in Google.
Google is all about making the internet faster and more accessible for everyone. Plus, you’ve got to remember a poorly coded website may affect the way the search engine spiders crawl you site, which in turn could result in pages not being found which are worthy of good Google rankings.
There is a lot to say about cleanly code website, keeping file sizes down, avoiding on-page styling etc, but I’m confident in saying that a cleanly coded website is far better than a validated website.
Edit (August 2011): Since writing this post, I believe that it may become a loose factor due to the Caffeine and Panda update.