If one considers a hyperdoctrine of subobject lattices, hence a collection of them parameterized over a category of contexts and equipped with pullback/substitution/context extension, then a universal closure operator or modality is a closure operator acting on each of the slices and being compatible with the pullback operation. A hyperdoctrine equipped with such an operator is sometimes called a modal hyperdoctrine.
If there is moreover a subobject classifier $\Omega$ (hence if that hyperdoctrine is the collection of slice categories of a topos) then a universal closure operator is represented by a single monad/comonad on that subobject classifier, $\Diamond \colon \Omega \to \Omega$, see the discussion below.
Instead of subobjects one may consider more generally closures acting on the full slice categories. This promotes the corresponding modal logic to modal type theory. Unlike in the posetal case, such a monad will not automatically be idempotent, but often one requires this explicitly.
Let $Sh_j(\mathcal{C}) \stackrel{\overset{L}{\leftarrow}}{\hookrightarrow} \mathcal{E}$ be a reflective subcategory of a topos $\mathcal{E}$.
Here we discuss explicit translations between the structure given by the reflector $L$ and the corresponding closure operator $j \colon \Omega \to \Omega$ (the Lawvere-Tierney operator) in a way that makes the relation to modal type theory and monads (in computer science) most manifest.
Given a reflector $\sharp : \mathcal{E} \stackrel{L}{\to} Sh_j(\mathcal{E}) \hookrightarrow \mathcal{E}$, define for each object $X \in \mathcal{E}$ a closure operator, being a functor on the poset of subobjects of $X$
by sending any monomorphism $A \hookrightarrow X$ classified by a characteristic function $\chi_A : X \to \Omega$ to the pullback $c_L(A)$ in
where $X \to \sharp X$ is the adjunction unit.
This is well defined. Moreover, $c_L$ commutes with pullback (change of base).
This appears as (Johnstone, lemma A4.3.2).
A family of functors $Sub(X) \to Sub(X)$ for all objects $X$ that commutes with change of base is called a universal closure operation.
Given a left exact reflector $\sharp$ as above with induced closure operation $c_L$, the corresponding Lawvere-Tierney operator $j : \Omega \to \Omega$ is given as the composite
where
$\Omega \to \sharp \Omega$ is the adjunction unit;
$\chi_{\sharp true} : \sharp \Omega \to \Omega$ is the characteristic function of the result of applying $\sharp$ to the universal subobject
(which is again a monomorphism since $\sharp$ preserves pullbacks).
For $A \hookrightarrow X$ any subobject with characteristic function $\chi_A : X \to \Omega$, we need to show that we have a pullback diagram
The pullback along the rightmost morphism is by definition $# * \to \sharp \Omega$
Moreover, by the naturality of the adjunction unit we have a commuting diagram
Using this in the remaining bottom morphism of our would-be pullback square we find that equivalently
needs to be a pullback diagram. Since $\sharp$ preserves pullbacks we have that also the middle square in
is a pullback. But then also the left square is a pullback, by def. . This finally means, by the pasting law, that also the total rectangle is a pullback.
Equivalently, by the pasting law, we have that $j : \Omega \to \Omega$ is the characteristic function of the $L$-closure, def. , of the universal subobject $* \to \Omega$, because we have a pasting diagram of pullback squares
In this form the statement appears in the proof of (Johnstone, Theorem A4.3.9).
In a topos a universal closure operator as above is also called a Lawvere-Tierney topology.
For a local topos there are the closure operators flat modality $\dashv$ sharp modality.
Section A4.4 of