Inter-element whitespace can affect inline layout in CSS, most (in?)famously demonstrated in questions like How to remove the space between inline-block elements? that seem to treat it as some sort of virulent plague that must be eradicated. As long as you're not abusing inline layout for things it wasn't meant for, though, you'll find whitespace to be an asset rather than a hurdle in inline layout. See also the white-space
property.
Inter-element whitespace has no effect on any other kind of layout in CSS. Not block layout, table layout, float layout, flex layout, nada. If it does, it's a browser bug.
Provided there is no inter-element whitespace outside of a comment (between it and any elements), comments should have no effect on any layout. The following fragments are equivalent:
<div></div><!--
Here be dragons
--><div></div>
<div></div><div></div>
Some versions of Internet Explorer (particularly the older ones) may build DOM trees incorrectly in the presence of comments, but such issues are few and far between and not worth worrying about until you encounter one yourself.
The main reason for stripping comments and insignificant whitespace from HTML is to cut down on file size. Even if you're using tabs and not spaces for indentation, they do add up. However since minifiers don't have knowledge of layout in CSS, they won't be able to tell you if removing a certain space will have adverse effects on layout.