We show that carbon-doped hexagonal boron nitride (h-BN) has extraordinary properties with many possible applications. We demonstrate that the substitution-induced impurity states, associated with carbon atoms, and their interactions dictate the electronic structure and properties of C-doped h-BN. Furthermore, we show that stacking of localized impurity states in small C clusters embedded in h-BN forms a set of discrete energy levels in the wide gap of h-BN. The electronic structures of these C clusters have a plethora of applications in optics, magneto-optics, and opto-electronics.