Theoretical studies of the optical properties of photonic crystal and microcavity-based structures