We derive rigorous conditions for the synchronization of all-optically coupled lasers. In particular, we elucidate the role of the optical coupling phases for synchronizability by systematically discussing all possible network motifs containing two lasers with delayed coupling and feedback. Hereby we explain previous experimental findings. Further, we study larger networks and elaborate optimal conditions for chaos synchronization. We show that the relative phases between lasers can be used to optimize the effective coupling matrix.