Question: Given a topology $\tau$ for a set $S$, one can easily check if some functions are continuous between some subsets $A,B \subseteq S$, inheriting a topology from $\tau$ to both. My question is if/how I can do the other way around. Choosing the kind of function $f: A \rightarrow B$ that I want to be continuous between $(A, \tau|\_A)$ and $(B, \tau|\_B)$, how can i construct such $\tau$?

To help understand what I mean, I'll give an example. The continous deformations (not creating holes or glueing point) can be checked to be continuous under the standard topology in $\mathbb{R}$. But suppose I don't know the existence of the standard topology, can I deduce it just by deciding that I want the continuous deformations to be my continuous functions between topological spaces with such topology? If so, there is a "standard method" to deducing such topology?

Answer: 
For whatever map $f$, the [trivial topology](https://en.wikipedia.org/wiki/Trivial_topology) is a topology that will make $f$ continuous for any $A,B \subseteq S$. So I don't think that you can recover **a specific** topology. The trivial topology will always satisfy your requirement.
I mean a really trivial thing could be to choose the discrete topology.

But let me describe a more common scenario : imagine we have a map $f:A\to B$ (note to define a map all we need is the sets $A,B$). Further imagine we know that we have a topology on $B$, call it $\tau\_B$, then

$$
A \overset{f}{\longrightarrow} (B,\tau\_B),
$$

now how does one construct a topology on $A$, call it $\tau\_A$ so that $f$ is continuous? Well its common to construct it exactly like that i.e

$$
\tau\_A:=\{ M\subset A~:~f^{-1}(N)\in \tau\_B \},
$$
then for sure $f$ is continuous, i.e this is the coarsest topology one needs for continuity of $f$. $\textbf{Of course}$ one still needs to check $\tau\_A$ is a topology, it might not always be!