What is the class of topological spaces $X$ such that the functors $\times X:\mathbf{Top}\to\mathbf{Top}$ have right adjoints?

In general, in a category $\mathsf{C}$ that has products, an object $c$ such that $- \times c : \mathsf{C} \to \mathsf{C}$ has a right adjoint is called exponentiable. There are various characterizations of exponentiable objects in $\mathsf{Top}$, and you can find some of them in this $n$Lab article:

Theorem (Exponentiability, I). An object $X$ of $\mathsf{Top}$ is exponentiable if and only if $X \times -: \mathsf{Top} \to \mathsf{Top}$ preserves coequalizers, or equivalently quotient spaces.

For open subsets $U$ and $V$ of a topological space $X$, we write $V \ll U$ to mean that any open cover of $U$ admits a finite subcover of $V$; this is read as $V$ is relatively compact under $U$ or $V$ is way below $U$. We say that $X$ is core-compact if for every open neighborhood $U$ of a point $x$, there exists an open neighborhood $V$ of $x$ with $V \ll U$. In other words, $X$ is core-compact iff for all open subsets $V$, we have $V=\bigcup \{ U \mid U \ll V \}$.
If $X$ is Hausdorff, then core-compactness is equivalent to local compactness.

Theorem (Exponentiability, II). An object $X$ of $\mathsf{Top}$ is exponentiable if and only if it is core-compact.

In particular, a Hausdorff space is exponentiable iff it is locally compact.


A point of warning: in general, even if $Y^X$ exists, it may be the case that $Y^X$ is not exponentiable itself! This has lead to a search for what is called a convenient category of topological spaces: you can think of it as a category of spaces (a full subcategory of $\mathsf{Top}$) that you can use for all your usual operations. There are multiple candidates, for example compactly generated weakly Hausdorff spaces. It all depends on what you want to do with them.


In answer to a question that came up in comments under Najib's answer, let me point out that the category of pseudotopological spaces is a locally small cartesian closed category that contains $\text{Top}$ as a full subcategory. Actually, this category $\text{PsTop}$ has the even stronger property of being complete and locally cartesian closed and indeed is a quasitopos.

Exactly the same remarks apply to the even larger category of convergence spaces (larger in the sense that pseudotopological spaces are special types of convergence spaces).

Moreover, we have the very nice fact that the inclusion functor $i: \text{Top} \hookrightarrow \text{PsTop}$ preserves exponential objects, in the sense that if $X, Y$ are topological spaces such that the exponential $Y^X$ exists in $\text{Top}$, then the canonical map $i(Y^X) \to i(Y)^{i(X)}$ is an isomorphism (of course, the exponential on the right is formed qua the cartesian closed structure on $\text{PsTop}$).

One way of thinking about this is that for any topological spaces $Y, X$, the natural candidate for an exponential topology on the set of continuous functions $\hom_{\text{Top}}(X, Y)$ (if one exists) is always given by continuous convergence, meaning the topology that is naturally associated with the convergence relation that defines the exponential in $\text{PsTop}$. That is, a topology (called the natural topology on $\hom_{\text{Top}}(X, Y)$) can always be formed that corresponds to continuous convergence, and so must be the exponential topology on $Y^X$ whenever there is one, and it is always the case that this natural topology is the finest topology on $\hom_{\text{Top}}(X, Y)$ such that given any topological space $A$ and a continuous function $A \times X \to Y$, the function $A \to \hom_{\text{Top}}(X, Y)$ formed by currying is also continuous. For basics on continuous convergence, see these notes by Mike Shulman (and the references given therein).