Fussy spacing issues
These are issues that won't affect the correctness of formulas, but might make them look significantly better or worse. Beginners should feel free to ignore this advice; someone else will correct it for them, or more likely nobody will care.
Don't use \frac in exponents or limits of integrals; it looks bad and can be confusing, which is why it is rarely done in professional mathematical typesetting. Write the fraction horizontally, with a slash:
$$\begin{array}{cc} \mathrm{Bad} & \mathrm{Better} \\ \hline \\ e^{i\frac{\pi}2} \quad e^{\frac{i\pi}2}& e^{i\pi/2} \\ \int_{-\frac\pi2}^\frac\pi2 \sin x\,dx & \int_{-\pi/2}^{\pi/2}\sin x\,dx \\ \end{array}$$
The | symbol has the wrong spacing when it is used as a divider, for example in set comprehensions. Use \mid instead:
$$\begin{array}{cc} \mathrm{Bad} & \mathrm{Better} \\ \hline \\ \{x|x^2\in\Bbb Z\} & \{x\mid x^2\in\Bbb Z\} \\ \end{array}$$
When using stretchable delimiters (i.e. with \left and \right), it may be preferable to use \,\middle|\,. This produces a stretchable vertical bar with a little bit of space around it. Another alternative is to use a colon instead.
$$\begin{array}{cc} \mathrm{Bad} & \mathrm{Better} \\ \hline \\ \left\{\dfrac{m}{n} \mid m,n\in\Bbb Z\right\} & \left\{\dfrac{m}{n} \,\middle|\, m,n\in\Bbb Z\right\} \\ \end{array}$$
For double and triple integrals, don't use \int\int or \int\int\int. Instead use the special forms \iint and \iiint: $$\begin{array}{cc} \mathrm{Bad} & \mathrm{Better} \\ \hline \\ \int\int_S f(x)\,dy\,dx & \iint_S f(x)\,dy\,dx \\ \int\int\int_V f(x)\,dz\,dy\,dx & \iiint_V f(x)\,dz\,dy\,dx \end{array}$$
Use \, to insert a thin space before differentials; without this $\TeX$ will mash them together:
$$\begin{array}{cc} \mathrm{Bad} & \mathrm{Better} \\ \hline \\ \iiint_V f(x)dz dy dx & \iiint_V f(x)\,dz\,dy\,dx \end{array}$$
When using a function (e.g. $f$, $\sin$, etc) followed by arguments with larger parentheses, insert negative space before the parentheses using \!:
$$\begin{array}{cc} \mathrm{Bad} & \mathrm{Better} \\ \hline \\ f\left( \dfrac{1}{x} \right) & f\!\left(\dfrac{1}{x}\right) \end{array}$$
When using absolute value, use \lvert ... \rvert instead of a pair of pipes |...|.
$$\begin{array}{cc} \mathrm{Bad} & \mathrm{Better} \\ \hline \\ |\sin x| & \lvert\sin x\rvert \end{array}$$