If the suit is to be filed in the US, the first step is to officially register the copyright. No US copyright infringement suit can be brought until the copyright has been registered. The registration process includes a formal declaration as to who the author is (or authors are). (I believe this statement is made under penalty of perjury.) Once the registration issues, the certificate of registration is admissible evidence of the facts stated in it in a us court. Indeed 17 USC 410 (c) provides that:
(c) In any judicial proceedings the certificate of a registration made before or within five years after first publication of the work shall constitute prima facie evidence of the validity of the copyright and of the facts stated in the certificate. The evidentiary weight to be accorded the certificate of a registration made thereafter shall be within the discretion of the court.
In other countries, the testimony of the plaintiff in a copyright infringement suit is itself evidence that the work was created as stated.
In either case, it is possible for the defendant to challenge the assertion and claim that s/he is the actual author. Showing when and where the work was first published can usefully corroborate the plaintiff's testimony. Having included a copyright notice in the initial publication may be of value, but if the notice only lists the pen name, it is not of much value. Records of the platform on which a work has been published may help in verifying the identity of the author. So may the testimony of others who saw or read the work, or who were told about it by the author. An author's own copies may be of value, if they carry a timestamp, as computer files generally do. But computer timestamps are not usually secure. Timestamps on email generally are reasonably secure, and could establish that the content existed and had been transmitted on a specified date by a specified person.
But none of this will matter unless the defendant claims that the plaintiff is lying in claiming authorship. Unless that happens, the plaintiff's testimony will usually settle the matter.
A person whose work seems to have been infringed would usually be wise to consult a lawyer with experience in copyright suits. Such a lawyer could advise if it is wise to bring suit at all, and if it is, what evidence will probably be needed.