The dungeons are where the Slytherin common rooms are.
Gryffindor and Ravenclaw have towers. The Hufflepuffs have a basement near the kitchens.
Professor McGonagall is not punishing the Slytherins, just trying to keep them safe by sending them to their common room. Slytherin is the only house that will show Voldemort any favour and, as such, they are in immediate danger from the other pupils, who would likely side with Harry. In the book, after Pansy Parkinson suggests handing him over:
Before Harry could speak, there was a massive movement. The Gryffindors in front of him had risen and stood facing, not Harry, but the Slytherins. Then the Hufflepuffs stood and, almost at the same moment, the Ravenclaws, all of them with their backs to Harry, all of them looking towards Pansy instead, and Harry, awestruck and overwhelmed, saw wands emerging
everywhere, pulled from beneath cloaks and from under sleeves.
"Thank you, Miss Parkinson," said Professor McGonagall in a clipped voice. "You will leave the Hall first with Mr Filch. If the rest of your house could follow."
The Slytherins are evacuated first in the book to segregate them and prevent trouble. No one is evacuated in the film, but the Slytherins still need segregated, and their common room seems the obvious choice.