I don't know about the worse dialogue, but these may count as some of the dumbest.
From ST VI: The Klingons are considering peace negotiations. Starfleet's top officers are gathered to discuss the situation.
Female Officer: Bill, are we talking about mothballing the Starfleet?
C.I.C: I'm sure our exploration and science programs would not be affected, but the facts speak for themselves, Captain.
They're actually considering dismantling their entire military because the Klingons were considering peace negotiations.
As if they didn't have to worry about threats from other powers or cultures anymore whatsoever for the rest of eternity.
Then the C.IC's reply suggests that the Federation puts a higher priority on science and exploration than on actually defending the Federation.
From The Valiant DS9: Jake and Nog are leaving a Starbase in a runabout. 3 Dominion attack ships suddenly appear, heading towards the base. Jake and Nog try to flee the area.
NOG: See if you can open a channel to Deep Space Nine.
JAKE: Something's wrong. I think they're jamming our comm. system. [I]Now why would they do that?[/I]
NOG: Because one of them's turned around and now he's coming after us.
That question makes Jake seem really naive. Especially considering that this is during a war.
As if he expected the Jem Hadar to just ignore them, because it wasn't like they were going to call for help or notify the nearest fleet or anything.