  The aim of this work is to study the role of relative entropy in the
thermodynamics of black holes and cosmological horizons. We adapt some recent
results on the relative entropy of coherent excitations of the vacuum, to find
the variation of generalised entropy of static and dynamical black holes and
for cosmological horizons.
  We review the argument for static black holes by Hollands and Ishibashi
(2019) with simple modifications. We link the variation of relative entropy to
the growth of the horizon using a conservation law for the stress-energy
tensor, and we recover the known results. We then study the application of the
same framework to the case of dynamical horizons. We study in detail the case
of Vaidya spacetime, and we find that a notion of black hole entropy naturally
emerges, equals to one-fourth of the area of the dynamical horizon. In the case
of dynamical black holes we find an additional term, which is not present in
the static case, and that represents the work done on the black hole. We
finally show in a simple case that it is possible to follow the same scheme to
assign an entropy to the horizons emerging in cosmological scenarios.
