Can trees help reduce the damage done by earthquakes?
In an earthquake, a fault line experiences a disruption. There are a few types of disruptions, but all of them occur at a single point on a fault line, where the ground will slide and push against itself.
After this sliding action, a wave travels through the rock, dirt, and any other material it hits. If it passes into the water, for example, the result is a tsunami, and the waves are not just at the surface, but rather throughout the planet, all the way down to the core. These waves carry enormous energies, and propagate at fantastic speeds. For example, a 6.0 magnitude earthquake on the Richter scale can carry approximately the same energy yield as an atomic bomb. The speed of an earthquake is about 5 kilometers per second. To compare, the speed of sound in air is about .3 kilometers per second. The denser the material, in fact, the faster and more violent the propagation of the wave. Were the trees to compact the soil, this would make the earthquakes worse, not better.
On the other hand, trees are known for breaking and penetrating the soil, turning it and reducing density.
Trees are not incredibly strong; rather, they are flexible in nature and bend easily when they encounter a strong force. In an earthquake, trees tend to just bend out of the way as the wave travels, rather than trying to stop the wave through strength.
Earthquake resistant structures are designed the same way, with the intent of just bending out of the way rather than taking the force head on. To conclude, trees would do next to nothing in preventing earthquake damage, as they would stay out of harm's way.
This website will tell you more about the nature of earthquakes.
This is a video of trees during an earthquake above a fault line. You can see how little they do to stop the earthquake.