@Kishore Gawande referenced the NBER working paper by Alberto Abadie, Susan Athey, Guido W. Imbens, and Jeffrey Wooldridge but I think it would be useful to repeat the key conclusions here as (per my reading) they do not necessarily align with every aspect of the the most accepted answers here.
First, clustered standard errors are a design rather than a model issue. Just because clustering standard errors makes a difference (results in larger standard errors than robust standard errors) is no reason that you should do it. Here's the top line: you should use clustered standard errors if you're working with a cluster sample or with an experiment where assignments have been clustered.
There's one exception. If there's no heterogeneity in the treatment effects and assignments have not been clustered, you don't have to use clustered standard errors. If you're using fixed effects, this requirement is looser. If there's no heterogeneity in the treatment effects, you don't have to use clustered standard errors. However, as Abadie et al. note, it's very unlikely that in practice there will be no heterogeneity in treatment effects, so this difference doesn't make much difference in practice. Hence, whether you're using fixed effects or not, if you're working with a cluster sample or clustered assignments, use clustered standard errors.
To quote Abadie et al. directly:
Without fixed effects, one should cluster if either (i) both $P_{C_n}$ < 1
(clustering in the sampling) and there is heterogeneity in the
treatment effects, or (ii) σ2 > 0 (clustering in the assignment). With
fixed effects, one should cluster if either (i) both PCn < 1
(clustering in the sampling) and there is heterogeneity in the
treatment effects, or (ii) σ2 > 0 (clustering in the assignment) and
there is heterogeneity in the treatment effects. In other words,
heterogeneity in the treatment effects is now a requirement for
clustering adjustments to be necessary, and beyond that, either
clustering in sampling or assignment makes the adjustments important
In his answer, @Alex's says "Clustered standard errors are for accounting for situations where observations WITHIN each group are not i.i.d. (independently and identically distributed)" and provides the following example:
Alternatively, if you have many observations per group for
non-experimental data, but each within-group observation can be
considered as an i.i.d. draw from their larger group (e.g., you have
observations from many schools, but each group is a randomly drawn
subset of students from their school), you would want to include fixed
effects but would not need clustered SEs.
This is misleading. If the sample is clustered and there is heterogeneity in the treatment effects (and there usually is), you need clustered standard errors.
To put this in the terms of survey sampling, if the design effect is greater than 1, i.e. observations from a group are not independent because they are more similar to each other than to observations from other groups, then you have to account for this. Ensuring that you sample from each group (e.g. school) is random, doesn't in any way bale you out here. Your effective sample size is less than your actual sample size. This is what leads to standard errors that are too narrow unless they are adjusted (via clustered standard errors) to account for this.
For all the fine print, include simulations and mathematical proofs, see Abadie et al. When Should You Adjust Standard Errors for Clustering.