Global warming, climate change and the energy crisis are trending topics around the world, especially within the energy sector. The rising cost of energy, greenhouse gas (GHG) emissions and global temperatures stem from the over-reliance on fossil fuel as the major energy resource. These challenges have highlighted the need for alternative energy resources and urgent intervention strategies like energy consumption reduction and improving energy efficiency. The heating, ventilation, and air-conditioning (HVAC) system in a building accounts for about 70% of energy consumption, and a decision to reduce energy consumption may impact the indoor environmental quality (IEQ) of the building. It is important to adequately balance the tradeoff between IEQ and energy management. Artificial intelligence (AI)-based solutions are being explored for improving building energy performance without compromising IEQ. This paper systematically reviews recent studies on AI and machine learning (ML) for building energy management and IEQ by exploring common use areas, the methods or algorithms applied and the results obtained. The overall purpose of this research is to add to the existing body of work and to highlight energy-related AI applications in buildings and the related gaps. The result shows five common application areas: thermal comfort and indoor air quality (IAQ) control; energy management and energy consumption prediction; indoor temperature prediction; anomaly detection; and HVAC controls. Gaps involving policy, real-life scenario applications, and insufficient study of the visual and acoustic comfort areas are also identified. Very few studies take into consideration the need to follow IEQ standards in the selection process and positioning of sensors in AI applications for IEQ in buildings. This study reveals a need for more systematically summarized research.