http://revach.net/article.php?id=4112

Section: Parshas HaShavua   Category: Quick Vort
Parshas Bireishis: Chasam Sofer - Chava Couldn't Resist A Tasty Tree
The first creation to commit an aveira was the fruit tree.  Hashem commanded it to produce tasty fruit and the tree itself was also supposed to have the same taste.  Chazal tell us that because of this, when Adam was punished for his aveira the tree was also cursed.  What is the connection?

The Chasam Sofer explains that what tempted Chava to indulge in the Eitz HaDaas was the fact that it was different from all the other trees.  The tree itself was edible and very appealing.  This is seen in the Pasuk that says Chava saw, "Ki Tov HaEitz", that the tree itself was good.

Had all the trees been edible like the Eitz HaDaas, Chava would have never desired to eat from the forbidden tree.  However since all the other trees were not themselves edible, Chava gave in to temptation.  This is why when she was punished, so too were the trees.