Acts 4:21 usage of article

Context: The temple authorities, concerned about the religious correctness of a miracle performed by Peter and John, call them in for an inquiry, but let them go with a warning.

οἱ δὲ προσαπειλησάμενοι ἀπέλυσαν αὐτούς, μηδὲν εὑρίσκοντες τὸ πῶς κολάσωνται αὐτούς, διὰ τὸν λαόν, ὅτι πάντες ἐδόξαζον τὸν θεὸν ἐπὶ τῷ γεγονότι:

Translation: after warning them [Peter and John] they [the temple authorities] let them go finding nothing for which they might punish them, because of the common people, for they were all praising God about what had happened.

τὸ πῶς κολάσωνται: I don’t understand the grammar of this phrase, especially the definite article. Is this an idiom?

Not really an idiom. This says it well:

τὸ πῶς κολάσωνται αὐτούς. The article functions as a nominalizer (see 1:3 on τὰ), changing the interrogative clause into a substantive that serves as the direct object of εὑρίσκοντες (cf. 1 Thes 4:1; BDF §267).

Culy, M. M., & Parsons, M. C. (2003). Acts: A Handbook on the Greek Text (p. 74). Waco, TX: Baylor University Press.

And BDF:

  1. The article with quotations and indirect questions. (1) The article τό is used as in classical before quoted words, sentences and sentence fragments: τὸ Ἀνέβη E 4:9, ἐν τῷ Ἀγαπήσεις (smoothed in p46 to ἀγαπῆσαι) etc. G 5:14. (2) Even indirect questions are occasionally substantivized by τό (already in classical), but seldom outside the Lukan corpus: R 8:26 τὸ γὰρ τί προσευξώμεθα οὐκ οἴδαμεν.

Blass, F., Debrunner, A., & Funk, R. W. (1961). A Greek grammar of the New Testament and other early Christian literature (p. 140). Chicago: University of Chicago Press.

μηδὲν εὑρίσκοντες τὸ πῶς κολάσωνται αὐτούς
(1) κολάσωνται is a deliberative subjunctive, “how they are to punish them” (i.e. “a way to punish them”). It’s the same in Latin, as you know.
(2) The τό bundles πῶς κολάσωνται αὐτούς together to make a noun phrase, the object of εὑρίσκοντες. It’s not grammatically necessary but makes for syntactic clarity.

It’s an interesting koine usage. The Romans example, τὸ γὰρ τί προσευξώμεθα καθὸ δεῖ οὐκ οἴδαμεν, again with a deliberative subjunctive, could have been simply τί γὰρ προσευξώμεθα καθὸ δεῖ οὐκ οἴδαμεν (“For we don’t know what we are to pray as we should”), but the initial τὸ serves to ensure that the indirect question is not taken as a direct question (“What are we to pray as we should?”). It makes clear that the question is the object of οὐκ οἴδαμεν, not a self-standing query.
Contrast e.g. Matt.20.22, ουκ οιδατε τί αιτεισθε, where it would be merely fussy to have a τὸ plonked in front of τί.

Many thanks to mwh and Barry for the enlightening explanations. If I ever studied this particular use of the definite article, I forgot it. Upon encountering this instance I was baffled.