This research focuses on the crucial task of accurately forecasting electricity consumption, a key concern in modern societies where electricity is essential for industries, healthcare, and transportation. The study explores the complex factors influencing electricity usage, aiming to improve the accuracy of consumption forecasts. Recognizing the limitations of current forecasting techniques, which often fail to account for the detailed interplay of variables affecting consumption, it introduces innovative methods to address these challenges. By employing sensitivity analysis and advanced hybrid boosting algorithms, such as LightGBM and CatBoost optimized with Arithmetic Optimization and Fruit Fly Optimization Algorithms, the research analyzes time-series data on electricity use, weather conditions, and usage timing across three power distribution networks. The sensitivity analysis reveals the significant impact of customer behavior and temperature on consumption patterns. The predictive models, especially the optimized LightGBM, demonstrate remarkable accuracy, with rates of 0.9996 and 0.9968 for training and testing datasets, respectively. These results highlight the effectiveness of the proposed methodologies in providing accurate and reliable forecasts of electricity demand, offering valuable insights for the energy sector to manage resources more efficiently and meet consumption needs effectively.