The survival of coral reefs largely depends among other factors on the recruitment of a new generation of coral individuals that are more adapted to a rapidly changing climate and other anthropogenic stressors (e.g., pollution, sedimentation). Therefore, a better understanding of the coral settlement process, the molecules involved as well as crucial environmental drivers that control settlement success are needed. In this study, we identified a novel settlement inducer for the brooding scleractinian coral Leptastrea purpurea and highlight the importance of light for the settlement process. Crude extract of the red-pigmented bacterium Pseudoalteromonas rubra reliably triggered attachment and metamorphosis in L. purpurea larvae in less than 24 h. Prodigiosin (II) and the two derivatives, cycloprodigiosin (I) and 2-methyl-3-hexyl prodiginine (III) were isolated and structurally elucidated from the crude extract of P. rubra. We demonstrated that the photosensitive pigment cycloprodigiosin (I) was the responsible compound for attachment and metamorphosis in L. purpurea larvae. Under the tested light regimes (i.e., darkness, constant light and a dark-light alternation), cycloprodigiosin (I) triggered approximately 90% settlement at a concentration of 0.2 μg mL–1 under a 12 h alternating dark-light cycle, mimicking the light-flooded coral reef environment. Our findings enable for the first time a mechanistic understanding of the light-dependent larva to polyp transformation by discovering the novel bacterial settlement cue cycloprodigiosin and its photosensitivity as a determining factor for coral settlement.