We have employed a combination of first principles method and evolutionary algorithm (USPEX) to predict the crystal structure of layered hybrid organic-inorganic perovskites. We generated different fit structures by substituting the organic cations and halides. Furthermore, we predict the most stable configuration from the different polymorphs initially generated using very stringent relaxation conditions. We found stable structures for organic molecules possessing various bonding characters as well as molecular shapes. The reliability of this approach is demonstrated on a number of known structures and we found a strong correlation between the properties of the system and the bonding situation. Our investigation shows that this approach has significant potential for the study of hybrid perovskites as memristor and for solar applications.