The invention of novel light-harvesting materials is one of the primary reasons behind the acceleration of current scientific advancement and technological innovation in the solar sector. Organometal halide perovskite (OHP) has recently attracted a great deal of interest because of the high-energy conversion efficiency that has reached within a few years of its discovery and development. Modern machine learning (ML) technology is quickly advancing in a variety of fields, providing blueprints for the discovery and rational design of new and improved material properties. In this paper, we apply ML to optimize the material composition of OHPs, propose design methods and forecast their performance. Our ML model is built using 285 datasets that were taken from about 700 experimental articles. We have developed two different ML models to predict the bandgap and performance parameters of solar cell. In the first model, we employed three ML algorithms to investigate the relationship between bandgap and perovskite material composition. We estimated the performance characteristics using projected and actual bandgap. Second, ML models are used to predict the performance parameters employing the bandgap of perovskite and energy difference between electron transport layer (ETL) and hole transport layer (HTL) with perovskite as an input parameter. Simulation results suggest that the artificial neural network (ANN) technique, which predicts the bandgap by taking into consideration how cations and halide ions interact with one another, demonstrates a better degree of accuracy (with a Pearson coefficient of 0.91 and root mean square error of 0.059). The constructed ML model closely fits the theoretical prediction made by Shockley and Queisser, and that is almost hard for a person to discover from an aggregation of datasets.