Empty lines or not?
Just use blank lines where logically you want a paragraph break. Section headings naturally form paragraph breaks already so a blank line before or after them makes no difference. For other constructs such as lists leave a blank line around them if they are not considered part of a surrounding paragraph and do not leave blank line if the list is part of the surrounding paragraph.
Note that whether paragraphs are indented or not is a style choice which should be more or less independent of the markup around individual paragraphs.
In text mode, use (one or more) empty lines between paragraphs.
Do not use empty lines immediately ahead of display-math environments, i.e., do not start a paragraph with a display-math environment.
Do not use empty lines in displayed equation environments. (If you load the
amsmath
package, having empty lines insideequation
,align
, etc. will throw an error.)Floating environments such as
figure
andtable
can -- but do not have to be -- surrounded by blank lines. Providing whitespace around these environments, i.e., placing them between text paragraphs, almost certainly makes your code easier to read.Using empty lines immediately before or after
\part
,\chapter
,\section
, etc. is neither required nor prohibited. It's probably a good idea, though, to use whitespace generously to improve the legibility of one's code.