The elves of Mirkwood were not evil, just suspicious of dwarves, as elves tended to be at the time. Thraduil was a kinsman of Thingol after all!
The giant spiders were the only living thing that they had no mercy on.
Still elves they were and remain, and that is Good People.
Poor Thranduil was under the mistaken impression that Thorin and company were trying to attack his people, which was why he had them imprisoned - with adequate food and water. He could have ordered them executed.
Thranduil may have misinterpreted Thorin's reluctance to explain himself as hiding some sort of plot against him, when really, Thorin was trying to conceal the fact that he was going after his family fortune.
The problem seems to have been elves and dwarves mistrust of each other. A 'misunderstanding' as it was later described in the Council of Elrond.