The ESR of a capacitor can be important for stability - too high or too low can be a problem, sometimes
the poor ESR of an electrolytic is what is needed to avoid high frequency oscillation.
Every voltage regulator is different, and some datasheets don't give much information.
The old 78XX and 79XX linear regulators are pretty relaxed in their requirements for capacitors,
as they are emitter-follower output stages. LDO regulators can be much more fussy, and in
particular their tendancy to oscillate depends strongly on voltage headroom and load current.
Read what datasheet you can find, be prepared to experiment if unsure (but with a dummy load
that won't get fried if oscillation breaks out).