We study the decoherence dynamics of dipole-coupled two-level quantum systems in Ramsey-type experiments. We focus on large networks of two-level systems, confined to two spatial dimensions and with positional disorder giving rise to disordered dipolar couplings. This setting is relevant for modeling the decoherence dynamics of the rotational excitations of polar molecules confined to deep optical lattices, where disorder arises from the random filling of lattice sites with occupation probability p. We show that the decoherence dynamics exhibits a phase transition at a critical filling pc 0.15. For p < pc the dynamics is disorder-dominated and the Ramsey interference signal decays on a timescale T2 ∝ p −3/2 . For p > pc the dipolar interactions dominate the disorder, and the system behaves as a collective spin-ordered phase, representing synchronization of the two-level systems and persistent Ramsey oscillations with divergent T2 for large systems. For a finite number of two-level systems, N , the spin-ordered phase at p > pc undergoes a crossover to a collective spin-squeezed state on a timescale τsq ∝ √ N . We develop a self-consistent mean-field theory that is capable of capturing the synchronization transition at pc, and provide an intuitive theoretical picture that describes the phase transition in the long-time dynamics. We also show that the decoherence dynamics appear to be ergodic in the vicinity of pc, the long-time behaviour being well described by the predictions of equilibrium thermodynamics. The results are supported by the results of exact diagonalization studies of small systems.