Every trial should have been registered before any participants were recruited. Most journals will not accept a trial for publication unless it was registered prior to subject recruitment. The International Committee of Medical Journal Editors published a statement to that effect in September, 2004.
The writing up of clinical trials depends on who was the sponsor/investigator. If it was a partnership project with external sponsors then they typically lead the writing up. However it is often worth trying to offer or suggest that an investigator write the first draft as this is frequently accepted by external sponsors. Writing up is a very valuable learning experience and so it is good to secure as many opportunities as possible for investigators.
If it is a locally led and managed trial then it is a straightforward process with the PI deciding how to proceed.
If the trial is multi-centred, or being run with external sponsors it is advisable to agree the authorship at the outset at the clinical trial agreement stage. There are numerous articles that provide guidance on authorship and structuring of research papers. The CONsolidated Standards of Reporting Trials (CONSORT) Statement  offers a standard way for authors to prepare reports of trial findings in order to facilitate their complete and transparent reporting.
Global Health Trials has amalgamated many resources for Reporting and Writing Skills, including eLearning opportunities, Ask The Expert panel, Apps, and guidance articles, which you can access here.
This article originally appears on the Global Health Trials resources. Please visit us for more resources relating to trials.
Moher D, Schulz KF, Altman DG. The CONSORT statement: revised recommendations for improving the quality of reports of parallel-group randomised trials. Lancet 2001; 357(9263):1191-1194.