Buildings are among the largest energy consumers in the world. As new technologies have been developed, great advances have been made in buildings, turning conventional buildings into smart buildings. These smart buildings have allowed for greater supervision and control of the energy resources within the buildings, taking steps to energy management strategies to achieve significant energy savings. The forecast of energy consumption in buildings has been a very important element in these energy strategies since it allows adjusting the operation of buildings so that energy can be used more efficiently. This paper presents a review of energy consumption forecasting in smart buildings for improving energy efficiency. Different forecasting methods are studied in nonresidential and residential buildings. Following this, the literature is analyzed in terms of forecasting objectives, input variables, forecasting methods and prediction horizon. In conclusion, the paper examines future challenges for building energy consumption forecasting.