Hi, if you refer to a planetary body grazing the Earth at short distance, i don't think it could ever threaten its vegetation due to its long distance from Earth's surface (> 10.000 km). In this case, it is better to refer to as a "Meteoroid", i.e. a very small piece of asteroid travelling close to Earth without falling on it. If it does, it's then called a "Meteorite". So, Earth's vegetation wouldn't be affected unless a planetary rock survives atmospheric passage and disintegrate before hitting the Earth's surface. The resulted air burst would cause an explosion in the atmosphere which may burn vegetation up and shatter windows glasses at distance. Check on the internet the Tunguska and the Chelyabinsk events, both occurred in Russia, as examples. Hope to have answered your question :) Cheers.
Claudio Ventura Bordenca provides a superb summary. The object would need to interact with the Earth's atmosphere and then vegetation could potentially be damaged by (i) heat, (ii) the pressure wave, (iii) any particles or remainders reaching the Earth's surface, (iv) any resulting tsunami, and (v) any weather or climate change as a consequence of the interaction. Some sources with further details and examples:
Ilan Kelman nice from you for sharing references about the planetary defence. I didn't know them, i'll check them out! It brings me back to my Bachelor Thesis era. Thanks :)