as the title asks
What search engines do and do not read is an industry secret, but I would hazard a guess that the contents of HTML comments are largely, if not totally, ignored.
Certainly you could not stuff comments with loads of keywords hoping you would be ranked on them.
A link here from someone who has investigated this: http://www.seoconsultants.com/html/comments/
A comment from Matt Cutts
"agedia.com : Did you use HTML comments to index web sites ?
I believe that we have the ability to index them, but we usually don't index comments."
(Source: http://chat.abondance.com/google.html)
Some search engines read and parse the content of html comments, but this is mostly used in code search (Google has some features the like, others are koders.com). If you are worried about the overall page ranking on main engines or keyword search, html comments are generally not considered in search results outside of code search.
Here a discussion: http://codingforums.com/showthread.php?t=71686
Interesting page on search test: http://www.searchtools.com/test/comments/comment-test.html
Simple answer: it depends.
If you have lots of comments or something else triggering "uh... this page is weird" in the parser. This can cause you to be kicked completely out of google et al. This is because valid and invalid pages on the internet are to be parsed, and anyone actively trying to game the parser should be punished.
So while comments may or may not be parsed, they can affect the ranking in indirect ways. It all depends on the secret sauce in the parser/ranker.
There are other edge cases too. I would not use HTML comments if I were you.
(I have worked in this area for a major search engine)