This research presents a study of the optimal power flow for networked microgrids with multiple renewable energy sources (PV panels and wind turbines), storage systems, generators, and load. The OPF problem is performed using a conventional method and an Artificial Intelligence method. In this research, we investigated the performance of MGs system with renewable energy integration with focus on power flow studies. The calculation of the power flow is based on the well-known Newton-Raphson method and Neural Network method. The power flow calculation aims to evaluate the grid performance parameters such as voltage bus magnitude, angle, real and reactive power flow in the system transmission lines under given load conditions. The standard test system used was a benchmark test system for Networked MGs with four MGs and 40 buses. The data for the entire system has been chosen as per the IEEE Standard 1547-2018. The results showed minimum losses and higher efficiency when performing OPF using NN than the Newton-Raphson method. The efficiency of the power system for the networked MG is 99.3% using Neural Network and 97% using the Newton-Raphson method. The Neural Network method, which mimics how the human brain works based on AI technologies, gave the best results and better efficiency in both cases (Battery as Load/Battery as Source) than the conventional method.