They were trespassing in their kingdom. The elves claimed they had attacked their feast. And when Thorin would not tell the elven king why he was there, he decided to keep him captive until he told.
Chat with our AI personalities
At first the dwarves were captured because the Elf King had thought that the company was attacking the feasting elves. Then, when the king questioned them, they refused to answer, and finally Balin asked why they were being held prisoner.
The elf king answered, "It is a crime to wander in my realm without leave... After all the disturbance you have made i have a right to know what brings you here, and if you will not tell me, I will keep you all in prison until you have learned sense and manners!"
The elven king said "It is a crime to wander in my realm without leave. Do you forget that you were in my kingdom, using the road that my people made? Did you not three times pursue and trouble my people in the forest and ' rouse the Spiders with your riot and clamour? After all the disturbance you have made I have a right to know what brings you here, and if you will not tell me now, I will keep you all in prison until you have learned sense and manners!"
The Elven-king imprisons the dwarves because he believes them to be trespassing in his kingdom and that they tried to attack his people.
He thinks they were harassing his subjects at the feasts when they tried to run towards them.
The Elvenking imprisoned the dwarves because he thought that the company was harassing his guards and his royal subjects at the feast that they had, so he decided to imprison them.
The dwarves were being very loud, "Loud enough for the elves to have shot them in the dark"; (with their bows)
The dwarves also had no weapons or food, and were 'glad to captured'
Bilbo becomes very fierce when he kills the spider who was trying to capture him. This leads him to rescue the dwarves by killing many spiders and leading them away. He becomes the dwarves leader, and they follow.
the trolls capture all the dwarves but not Bilbo b/c he his smaller so he hides then the trolls argue about what to do w/ the dwarves and how to eat them then gandalf (who had left them a while ago) comes back and imitates the troll to keep them arguing until morning and they get turned to stone
The dwarves are Bilbo's friends for most of the Hobbit.
The elven king thought the dwarves were there to steal his treasures.
The movies do not tell why the Dwarves are hated in The Hobbit and The Hobbit DoS. However, it is believed that past wars and experiences are the reason the Dwarves are hated.