The growth of Internet of Things (IoT) devices continues to experience an exponential rise due to their vast applications in various industries. However, sustaining their operational lifetime is a major challenge due to critical factors, such as the need for frequent recharging of energy buffers. The recent convergence of green energy harvesting (EH) and IoT technologies has proven to be a potential solution to this challenge. However, the intermittent characteristics of green energy sources and wireless fading channels pose another challenge, as the quality of service in IoT networks revolves around the available energy and channel conditions. The traditional optimization strategies based on non-causal knowledge about these random quantities are deemed unsuitable for realizing an autonomous IoT network operation. To combat this challenge, various algorithms from the field of machine learning (ML) have been proposed as potential solutions. Therefore, in this article, we aim to investigate the applications of ML algorithms in EH IoT networks. To achieve this, first, we provide an overview of ML categories commonly adopted in IoT networks. Secondly, due to the peculiarity of EH IoT networks, we provide an extensive description of the ML categories widely explored in this domain. This includes reinforcement learning, deep learning, and deep reinforcement learning. Thirdly, we present a review of studies where the applications of the aforementioned ML algorithms are demonstrated. Further, we identify challenges that are likely to impact the implementation of these algorithms. In conclusion, we highlight unexplored and emerging areas for potential future research.