When using an oscilloscope, when is it (in general) better to use DC coupling over AC coupling and vice versa?
DC coupling shows you the whole signal, and AC coupling shows you only the AC component. Since these are different, it should be no surprise that each has its own advantages and disadvantages.
A basic example of DC coupling is to see the voltage of a power supply. Digital signals usually make more sense when viewed with DC intact. A signal may stay high for a long time, then start toggling a lot. The average DC will then go from the power supply level to about half that. Seeing the signal appear to float down during that time is misleading.
A basic example of AC coupling is to see the ripple on a power supply. The supply may look like a flat line at 3.3 V with DC coupling. If you try to crank up the gain to look at the ripple, the trace will be off the screen. AC coupling removes the average DC bias and lets you amplify only the deviations from that average. With AC coupling, you can crank the gain to 10 mV per division and see the level of noise, the pulses from the switching supply, or etc.
AC coupling is really useful if you want to see small AC signal on a large DC (or LF AC) signal, with DC coupling, you'd be limited in your maximum resolution by the DC signal (you can't discern 1mV of ripple with a 100V offset on an 8bit scope), but with AC coupling, you can cut out the DC and look at only the AC part of your input so your full scale resolution can be 1mV even if your signal has 100V of DC offset. But you can't make voltage level measurements as easily with AC coupling. AC coupling can make triggering easier as your input is always average centered around 0V - set the trigger to 0 and go for it. AC coupling will distort slowly changing signals (the DC block capacitor effective differentiates the input signal). DC coupling is vice versa.