This is something that is hard to verify in any quantitative way since they don't have the same reactions as animals. But I believe they do. If you start a fire close to a plant (but not close enough to actually catch it on fire) over the course of the day the plant will actually begin to lean away from the fire, this indicates that plants have at least some rudimentary "feelings" Trees are more rigid and have even less movement available to them but I would bet that if you could keep a fire going long enough next to a tree even it would start to lean away from it.
This is simple really... The oxygen reacts with the carbon in the roots at the trunk of the tree. This causes the sucrose in the leaves of the tree to react with any physical contact to the tree (eg. Any ripping of the leaves, breaking a branch) it can also feel the emotional pain through the positive ions in the stems. For example if u say tree I hate you, it will begin to shake, showing its negative reaction. Simple science, it rules!