In this talk, theoretical density functional theory (DFT) will be used to evaluate a class of novel alternative materials for N2 activation, ammonia formation and decomposition. Specifically, our recent work on transition metal or alloy-based nitrides (TMNs) will be discussed to show that the knowledge of molecular mechanism from theory is necessary and can lead to the formulation of guidelines to help identify appropriate materials and their optimizations. TMNs have been successfully demonstrated in stepwise, atmospheric ammonia synthesis in a nitridation cycle. Recent studies have also suggested that TMNs are also promising materials to catalyze N2, via electroreduction, to ammonia under ambient conditions. By following a Mars-van Krevelan mechanism, we identified that the nitride formation thermodynamics and nitrogen species diffusion kinetics under relevant process condition are both the key and will invoke the consideration of both aspects simultaneously in the nitridation-reduction cycle. To improve the TMN performance, the simple strategy to modify the electronic structures of TMN by alloying with other transition metals, targeting both bond formation and nitrogen transport within TMN, will be presented. Derived from our computational findings, bifunctional materials that are capable of efficient N2 activation and ammonia synthesis in synergy may hold the ultimate solution. Potential candidate materials that can be deployed for electrochemical or thermal ammonia production will be presented.