I would translate it as:
"The trees swayed in the wind." meaning that the trees moved back and forth slowly because of the wind.
Even though the preposition in Spanish is "con", the expression is "sway in the wind", and not "with" the wind.
Oh, and I almost forgot to answer your question: the sentence in Spanish means that the trees moved because the wind was blowing.