Validating your (X)HTML code is a social/technical contract between you and your users that commit you to a standard of compliance.When your code validates you are saying to your users that you plan to support the widest range of browsers, spiders, and robots.
Your code is most portable and re-usable when it validates, and it can help your search engine rankings.
You can find several stand-alone validation clients, such as the CSE Validator, or anonline validator, such as the one provided by the W3.