Under what circumstances is there at least one non-constant continuous function from a topological space $X$ to a topological space $Y$? Assume that $X$ and $Y$ each have at least two points. If $X$ is disconnected, separated by $A$ and $B$, then any function with one value on $A$ and another on $B$ is continuous. If $X$ is connected, then the image of $X$ under a continuous function must lie within a connected component of $Y$. Therefore, to avoid triviality, assume that $X$ and $Y$ are both connected.
The only theorem I've encountered of this nature is Urysohn's lemma, which proves such a function exists if $X$ is a $T_4$ space and $Y$ has a path-connected component with more than one point. This is of course a rather strong condition.
It's obvious that if $X$ is convex in $\mathbb{R}$ and $Y$ is totally path disconnected, then there is no such function.
Otherwise, I haven't a clue. I'm particularly curious about what happens if $X$ and/or $Y$ is required to be homogeneous or bihomogeneous, and/or if $Y$ is required to be uniform.