  We demonstrate that a weak disorder in atomic positions introduces spatially
localized optical modes in a dense three-dimensional ensemble of immobile
two-level atoms arranged in a diamond lattice and coupled by the
electromagnetic field. The frequencies of the localized modes concentrate near
band edges of the unperturbed lattice. Finite-size scaling analysis of the
percentiles of Thouless conductance reveals two mobility edges and yields an
estimation $\nu = 0.8$--1.1 for the critical exponent of the localization
length. The localized modes disappear when the disorder becomes too strong and
the system starts to resemble a fully disordered one where all modes are
extended.
