With the rapid transformation of the energy sector towards modern power systems represented by smart grids (SGs), microgrids (MG), and distributed generation, blockchain (BC) technology has shown the capability for solving security, privacy, and reliability challenges that hinder progress. Currently, the energy structure is forming a decentralized system that prioritizes customer satisfaction. BC technology undertakes power network stockholders in a secure energy market, transparent transactions, and fair competition and offers promising energy solutions. This paper is a comprehensive review of energy applications using BC integration. Firstly, we introduce the drivers of BC leverage that make it a potentially important component of the power network. Following that, we provide background information on BC and its application in areas other than the energy sector. Subsequently, we discuss studies and sort potential energy applications from various recent papers and surveys that have already adopted BC technology in the energy sector. Then, we summarize the pricing infrastructure for applying BC in the energy sector and identify the requirements to build it. Finally, energy security and privacy challenges based on BC are highlighted, along with potential drawbacks and concerns related to the pricing infrastructure.