Carrier localization due to statistical fluctuations in Indium Gallium Nitride alloys has been recognized to play an important role for light emitting diode performance, both experimentally and through theoretical studies. While usually a random alloy assumption is made, in this work we take into account the presence of spatial nonuniformities in the indium content on the nanometer scale, and we theoretically analyze its impact on the electronic and optical properties of the alloy and the device. We show that indium clustering induces tail states in both the conduction and valence bands. This causes a reduction of the band gap and a broadening of the optical absorption edge. Furthermore, compositional fluctuations in the active region of the device determine a substantial broadening of the optical emission spectrum and a decrease of the peak emission energy, in agreement with experimental results. Moreover, the radiative recombination coefficient increases for increasing degree of clustering, suggesting a transition to a quantum dot like structure. Finally, the temperature dependence of the radiative coefficient derived for the nonuniform structures is in good agreement with the experimental results, that show a temperature behavior opposite to the trend expected from standard theoretical considerations.