it will not effect your ranking but if your code is validated by w3c then it would be plus point for you
If your site is not w3c valid, it may decrease your ranking, besides the possibility of not being displayed correctly in different browsers of course.
yes as mentioned by other fellow members w3c is the identity of scripts made by serious guys so it must have some value for google.