Having to watch your DD testify will be horrible for you, but just keep saying something positive over and over in your mind. Find your mantra and keep saying it -- even if it is something like "We are strong!" or "We are brave!". It will help.
Let your daughter know that she is super brave and all she has to do is tell the truth to the judge. Explain to her that the judge won't hurt her or take her away or call her bad name or make her feel bad. Emphasize that the judge is a kind and helpful person for her and all he/she wants to do is hear what DD has to say.
That being said, if bio dad is that scary to your DD and had already been verbally/emotionally hurtful please ask your attorney if he/she would motion to the judge to have bio dad shielded just for the period that DD has to be on the stand and ask if the courtroom can be closed so that bio dad can't have his mom/dad/brother/sister/cousin/dog/etc there too. Bio dad can still be in the courtroom but maybe the judge can put up a screen (like one of those chinese room screens) or make it so your DD can turn the chair so she doesn't have to look at bio dad. Just my thoughts, if they are helpful.
You and your DD are brave and will be OK. Believe that. Also, if DD has a favorite stuffed animal or doll or toy that she just loves dearly, let her bring it with her. She may not be able to take it with her to the stand but she'll know that she has her comfort item before and after.
Also, don't let DD stay in the courtroom before or after she has to testify. If you can bring someone with you so DD can stay with that person outside the courtroom or in a conference room that would be better. She shouldn't have to know anything else that goes on.
Sending Brave thoughts! Tell her she is a brave warrior, just like Mulan!!!