If you're outside when clouds gather and you hear thunder, weather safety experts such as the National Weather Service recommend that you immediately seek shelter. The best place to be is indoors, but if you aren't near a building, you shouldn't take cover under a tree, especially if it is standing by itself or is the tallest in a grove of trees. If lightning strikes the tree, you can be killed by a falling branch or by electricity flowing through the tree.
What Lightning Is
The winds that accompany a storm agitate the air molecules and give them a static charge in much the same way that rubbing a cat's fur charges your hand. The charge is positive when compared to the ground, and when it becomes large enough, it discharges by flowing into the ground through the air molecules, ionising them in the process, and creating an arc of electrical energy. You can observe a similar effect when you bring two oppositely charged wires together. When they are close enough, electricity arcs through the air from one wire to the other, creating a spark.
Why Lightning Strikes Trees
Electricity always seeks the shortest path to its destination. When it arcs from the sky to the earth as lightning, it will find the closest object that is connected to the ground and flow through that object. The closest objects to the sky are usually the tallest ones, so tall trees are always vulnerable to lightning strikes during a storm, especially if they are standing by themselves. Lightning will often strike a branch near the top of a tall tree and flow through the trunk to the ground, where the energy dissipates through the roots into the earth.
When lightning strikes a tree, it delivers an enormous force of electrical energy that can break off branches or even split the trunk. It happens very quickly, and if you are under the tree when lightning strikes, you might not have time to get out of the way of the branches. You can also be electrocuted, because the trunk of the tree becomes charged as electricity flows through it, and if you are standing close enough, it will jump from the trunk into your body. It can also flow from the ground into your body through the soles of your feet.
Where to Seek Shelter
If you are outdoors when you hear thunder, you should immediately go indoors. If you can't, the next best place is inside a car or other vehicle. If there are no buildings or cars nearby, stay out of open fields and go to the lowest ground. If there is a stand of trees nearby, seek shelter under the lowest ones and stay away from the tall ones. Stay away from water and anything that conducts electricity, like metal fences and poles. If you have nowhere to go, make yourself as small as possible by crouching down with your head down and your legs together.