Why it is convenient to be cartesian closed for a category of spaces? In 1967 Steenrod wrote what later became a quite celebrated paper, A convenient category of topological spaces (Michigan Math. J. 14 (1967) 133–152). The paper conveys the work of many (among the most significant, the PhD thesis of Ronnie Brown) and provides a description of a convenient category of topological spaces.
Among the requirements, we see cartesian closedness. Since then, several papers studying categories of spaces like topoi, or locales, have characterised exponentiable objects, having in mind that seminal paper of Steenrod and it is impossible to recall all the papers impacted by that work.
In a sense, even the gros-toposes used in synthetic differential and algebraic geometry have among their main features to be cartesian closed, connecting the call of Steenrod to the general framework of axiomatic cohesion (and its relatives).
I always found this requirement very useful. Of course many constructions come more natural, or just easier, when one can juggle with an internal hom. Recently though I have been wondering what actually motivated Steenrod, whether he has something very concrete in mind, or was guided from an aesthetic need.

Q. In which proofs, theorems, or main constructions of general or algebraic topology (possibly also algebraic geometry) is it important or very useful that the homset actually carry a structure of topological spaces?

List of applications of internal homs I am aware of.

*

*Exa. 1.  Higher homotopy groups can be reduced to $\pi_0$ via loop-spacing.


*Exa. 2. Similarly cohomology, which can be phrased in terms of cohomotopy.
 A: One thing to keep in mind is that cartesian closedness implies that the functors $X \times (-)$ preserve colimits. Of course, modulo the applicability of the adjoint functor theorem, these two properties are equivalent. [1]
Furthermore, $X \times (-)$ always commutes with coproducts in a reasonable category of spaces such as $Top$. So if your category is not convenient, that means that $X \times (-)$ fails to preserve some pushout / quotient. Pushouts, of course, are the bread and butter of topology -- one is always constructing spaces by gluing other spaces together. I would not recommend trying to do topology in a setting where $X \times (-)$ does not preserve pushouts.
For instance, the geometric realization functor $|-| : sSet \to Top$ does not preserve finite products. But the geometric realization functor $|-| : sSet \to \mathcal C$ does preserve finite products when $\mathcal C$ is a convenient category of spaces. This is very naturally thought of as an issue of cocontinuity of $X \times (-)$.
[1] Although we are working with categories where invoking the adjoint functor theorem might in principle be subtle, it turns out that such subtleties are not actually what is at issue when we talk about convenient-ness of a category of spaces: in all examples I'm aware of, if a category of spaces is not cartesian closed, this is actually obstructed by some $X \times (-)$ failing to preserve some colimit. (I suspect, but have not actually checked, that other than colimit preservation, the hypotheses of the adjoint functor theorem are always satisfied by functors $X \times (-)$ on a reasonable category of spaces. And of course, some convenient categories, such as $\Delta$-generated spaces, are locally presentable so that the adjoint functor theorem becomes easy.)
A: A classical procedure for replacing an arbitrary map with a fibration (preceding Quillen's small object argument) relies on the space of paths in $X$ being a topological space, and the evaluation map $X^I\to X$ being a fibration.
A: I'm a little unclear on the parameters of the question. E.g. your example (1) doesn't require being in a convenient category, because $S^n$ is compact Hausdorff and hence exponentiable in $Top$.
That being said, here is an answer in an orthogonal direction to my other answer.
There are all sorts of geometric motivations for having mapping spaces. For example, if you want to define an $\infty$-category of cobordisms, it's very useful to model manifolds as certain points in a mapping space into $\mathbb R^\infty$. But for geometric purposes, you don't necessarily care about the categorical property of actually being an exponential object -- it's nice to have, but you probably have better-adapted geometric tools for constructing maps into your particular mapping space.
So maybe a better motivation for categorical mapping spaces is this: they exist in the $\infty$-category of spaces. So to the extent that you're using topological spaces to model homotopy types, you can follow this general principle: when working in $\infty$-categories presented by 1-categories, it's convenient to lift as many functors as possible which exist at the $\infty$-categorical level to the 1-categorical level. If you could lift the locally cartesian closed structure as well, you'd do it in a heartbeat. One advantage of using simplicial sets over topological spaces is that it is locally cartesian closed. [1]
So one possible answer to your question is to start listing all the different ways mapping spaces are used in the $\infty$-category $Spaces$ of spaces. This would be a rather large list... For example, it is natural to consider categories enriched in the $\infty$-category of spaces (i.e. $\infty$-categories). In order to define spaces functors and natural transformations therein, you use the function spaces in $Spaces$.
[1] This reveals another thing I find unclear about the question: the extent to which people doing homotopy theory are systematically using the model of topological spaces -- which is (maybe?) presupposed by the question -- is quite unclear. So to answer your question, we might need to have a preliminary discussion about the role of topological spaces in homotopy theory, which would be a rather long discussion...
