We've been here before. We explored a similar issue last August regarding the Nuremberg Trials transcripts and we start with the same principles -- copyright does not protect spoken testimony, only fixed versions of that testimony. The 'author,' for copyright purposes is typically 'the fixer,' -- in this case the court reporter. And as we also noted, at least one case has held that court reporters are not authors of courtroom testimony because the mechanical process of transcribing does not demonstrate sufficient originality. We're unable to find any caselaw that grants Copyright in trial transcripts. Although laws currently exist providing common law rights to spoken statements, it's not clear whether they could be successfully asserted against you. If we were a betting blog, we'd bet that you would be okay -- under copyright law -- to use the transcripts.
What about other legal theories? Are you in danger of defaming, invading anyone's privacy or infringing a right of publicity? As you're probably aware, many great plays have been based on trial transcripts, often years after the final gavel sounded -- for example, Inherit the Wind and The Crucible. Using a more current case may anger living participants especially if: (1) you add additional dialogue that slanders an individual, (2) you include false facts (or facts not introduced as public evidence), or (3) the trial is about someone famous and you use that fame as a basis for promoting your play. To further protect yourself, we recommend that you "fictionalize" the trial--for example, change the names and other identifying facts so that parties are not identifiable (this may be tricky if it is a locally publicized case).
Who gets credit? You get credit as author, at least as to the original material you contribute and your organization of the material and stage directions. You have no obligation to attribute the source (and it may even be wise to avoid doing that if you've ficitonalized.) When registering the work at the copyright office, you would disclaim the material from the trial transcript.