It has been more than 30 years that Photonic Crystal (PhC) have been used in wide variety of applications. The photonic bandgap phenomenon and the flexibility of such structures to manipulate the light have made them popular. PhC sensors are popular because of their promising characteristics like high measurement sensitivity, ultra-compact size, suitability for monolithic integration, and flexibility in structural design. In this thesis, a novel framework for designing optimized PhC sensors has been proposed. The complexity of such structures resulted in the lack of an analytical method to design the structures. Therefore, this framework aims to provide a comprehensive and automatic method to find the best values for the structural parameters without human involvement. The framework is explained with an example of designing a PhC liquid sensor. In the framework, an optimizer called Multi-Objective Gray Wolf Optimizer is utilized. However, a diverse range of multi-objective optimizer algorithms could be utilized. The results show that the proposed framework can design any kind of PhC sensor. Simplicity, being straightforward, and no human involvement are the advantages of the proposed framework. In addition, a significantly wide range of optimal designs will be found which are suitable for general and specific applications.