A solid state theoretical approach to the optical properties of photonic crystals