They are most likely generating those to uniquely identify each comment when they view source as it's not very likely or practical to apply styles this way. They are probably accomplishing this (assuming MVC) by looping through a collection of comments and attaching the CommentID to the id field like so:
<% foreach(var comment in Model) { %>
<li id="comment-<%= comment.CommentID %>">Foo</li>
<% } %>
I highly doubt they are using this to pass any information back to the server (Never tried but I think you could do it by parsing the id attribute with jQuery).
If you need to work with the CommentID for a scenario like this you're better of adding it to a query string that goes to an action method, or populating a hidden field in a form that posts to an action method.