Ammonia is the second most produced chemical worldwide that makes up 80% of nitrogen-based fertilisers, which have supported approximately 27% of the world's population over the last century. The Haber–Bosch process, which is the main process for producing ammonia, is extremely energy intensive and consumes around 1% of the world's energy. Additionally, it requires hydrogen gas as a reactant that is produced via steam reforming which emits carbon dioxide as a by-product. Over 500 million tonnes of ammonia are produced per year via industrial processes which required 3–5% of total natural gas consumption worldwide and also accounted for 2% global energy usage. Therefore, more sustainable processes, such as electrocatalysis and photocatalysis, using electrons and the transfer of protons has been investigated. This review covers the most state-of-the-art technologies used to produce ammonia via electrocatalysis and photocatalysis by comparing different electrolyte systems and electrocatalysts as well as discussing issues with these methods and possible solutions. In addition, substantial improvements to electrocatalysts and photocatalysts as well as methods to prevent both the promotion of the hydrogen evolution reaction and the decomposition of ammonia at higher temperatures are reviewed. Challenges and perspectives are discussed.