Yes private investigators can testify in court.
In fact if you're a private investigator you can sometimes be called into court to testify on your findings and what you've witnessed during your private investigations.
You can sometimes be summoned to court and have to show up to testify in a case if someone reports that they hired a private investigator.
However sometimes the private investigator may not be required to show up in court to testify but the private investigator can testify in court on what they saw or witnessed if needed.