Smart grid integrates computer, communication, and sensing technologies into existing power grid networks to achieve significant informatization-related advantages. It will provide communication between neighbors, localized management, bidirectional power transfer, and effective demand response. Smart grids (SG) replace conventional grids by integrating various operational measures, including smart automation appliances, smart meters, and renewable energy sources. Regarding energy management and resolving energy issues, SG is one of the most cutting-edge and potentially game-changing innovations. Even still, its complexity suggests that decentralization may provide significant gains. Because of its increasing digitization and interconnectedness, it is also vulnerable to cyber threats. Blockchain, in this sense, is a potential SG paradigm solution that provides several great benefits. Even though blockchains have been widely discussed to decentralize and strengthen smart grid cybersecurity, they have not yet been researched in depth from an application and architectural standpoint. Blockchain-enabled SG applications are the subject of an in-depth research investigation. Electric vehicles (EVs), home automation, energy management systems, etc., are only a few of the many examples that have prompted the proposal of blockchain designs for their respective use cases. Information communication network security is of paramount importance. However, this evolving system raises cybersecurity issues. This paper aims to guide researchers in the right manner so they may build blockchain-based, secure, distributed SG applications in the future. This article also summarizes cybersecurity threats pertaining to smart grids. It starts with a description of a blockchain followed by the blockchain infrastructure, challenges, and solutions for different smart grid applications. A look back at the tried-and-true methods of securing a power grid is offered, and then it discusses the newer and more complex cybersecurity threats to the smart grid. In addition, models of common cyberattacks are presented, and the methods of defense against them are examined.