I am looking at the datasheet of an accelerometer (ADXL345), and in the power supply decoupling section, it says to use a tantalum capacitor. Why is this recommended?
As I always say, it is very beneficial to follow manufacturer's recommendations, always. Analog Devices are in business for decades, their engineers know what they are doing. There must be a reason why they recommend tantalum. Unless you can find an application engineer at AD who worked on this product, we can mostly guess.
My guess is that the ADXL345 is a very delicate device. The Vs (analog interface) supply is listed as having voltage from 2V to 3.6V. It means that the internal "power management" block has a wide-range LDO.
In most cases the LDO functionality and stability depends on reactive-capacitive loads on both ends of LDO, both caps are a part of feedback loop transfer function. And in many cases the stability depends on finite value of ESR of the bypass caps. With a very "good" low-ESR cap the regulator might be unstable. It might not be completely unstable, but the regulation function might have some peaks, so the noise might be elevated on certain frequencies (or load change response has some ringing), thus degrading this MEMS device characteristics. Apparently the manufacturer did thorough evaluation and optimization of application environment, and they figured out that a less-perfect tantalum cap works better.
So my feeling is that the IC will work nearly fine with a ceramic cap, but some noise figures will be not up to specifications. You can try to research tantalum caps and emulate the elevated ESR with extra resistor, but you might face different performance figures. So it is better to simply follow AD recommendation.
EDIT: As "mkeith" brought a good point about microphonics. The IS is meant to work in shock environment, measure it accurately, so extra ringing on power from ceramic cap might be unwanted.
Edit: @mkeith brings up a good point with microphonics. The mounting of the capacitor will have a large effect on whether microphonics are an issue in the bandwidth of the sensor. Here is a Kemet document showing a comparison:
There are also "soft" termination X7R parts that may give some of the advantages of the expensive clip-on-lead frame MLCC caps. If your application involves high vibration it's definitely worth considering.
If you choose to use a ceramic you should pay attention to the voltage coefficient of the capacitor- you may need to use a 22uF to get 10uF effective capacitance at the working voltage.