How does DeepHF (CRISPR sgRNA design tool) compute $\Delta G_{\text{binding}}$?
The simplest model for estimating binding energies (or melting temperatures) is to consider each base pair individually, without regard to sequence context. This is the basis of the 4 deg / 2 deg rule of thumb for DNA duplex. You can refine this model by considering the effect of ionic strength. More sophisticated models go beyond just considering the composition to include sequence information.
The nearest-neighbor model for binding is the simplest of these more sophisticated models, and it looks like that's what is used here. For DNA:DNA duplexes, you can find  parameters on Wikipedia. The DNA:DNA model has less parameters because of symmetry lacking for the RNA:DNA hybrids (i.e. AG/CT is the same as TC/GA for the former, but AG/CU is different from TC/GA).
The code does not indicate the units, which might be kJ/mol or kcal/mol. The parameters are usually derived from experimental data and some fitting algorithm, see e.g. https://pubs.acs.org/doi/abs/10.1021/bi00035a029
Missing in this implementation is the contribution of the first and the last base pair.