Let me first fix terminology. Let $X$ be a topological space and $A\subseteq B\subseteq X$ be subsets.
Let's say X admits a bump function relative to $A\subseteq B$ if there's a continuous function $f\colon X\rightarrow [0,1]$ with $f|_A\equiv 1$ and $f|_{X\backslash B}\equiv 0$.
I'm interested in classes of spaces $X$ and conditions on the subsets $A,B$ as general as possible (ideally only point set topological restrictions) such that every space in this class admits a bump functions relative to subsets fulfilling this conditions.
An example: The class of topological spaces admitting the structure of smooth manifolds admits bump functions relative to subsets $K\subseteq U$, where $K$ is compact and $U$ is open. This class is way to specific for me. I'm looking for a statement like "the class of spaces, fulfilling point-set topological restrictions bla and blub admits bump functions relative to subsets $A\subseteq B$, where $A$ is blib and $B$ is blob.