The field of the Internet of Things (IoT) is dominating various areas of technology. As the number of devices has increased, there is a need for efficient communication with low resource consumption and energy efficiency. Low Power Wide Area Networks (LPWANs) have emerged as a transformative technology for the IoT as they provide long-range communication capabilities with low power consumption. Among the various LPWAN technologies, Long Range Wide Area Networks (LoRaWAN) are widely adopted due to their open standard architecture, which supports secure, bi-directional communication and is particularly effective in outdoor and complex urban environments. This technology is helpful in enabling a variety of IoT applications that require wide coverage and long battery life, such as smart cities, industrial IoT, and environmental monitoring. The integration of Machine Leaning (ML) and Artificial Intelligence (AI) into LoRaWAN operations has further enhanced its capability and particularly optimized resource allocation and energy efficiency. This systematic literature review provides a comprehensive examination of the integration of ML and AI technologies in the optimization of LPWANs, with a specific focus on LoRaWAN. This review follows the PRISMA model and systematically synthesizes current research to highlight how ML and AI enhance operational efficiency, particularly in terms of energy consumption, resource management, and network stability. The SLR aims to review the key methods and techniques that are used in state-of-the-art LoRaWAN to enhance the overall network performance. We identified 25 relevant primary studies. The study provides an analysis of key findings based on research questions on how various LoRaWAN parameters are optimized through advanced ML, DL, and RL techniques to achieve optimized performance.