Is a space of functions between two simply connected spaces connected itself? EDITED:
As some commenters have suggested, this question may be viewed as "homotopy in disguise". Perhaps it would be best to give the underlying spaces more structure.
Let $X$ and $Y$ be simply connected locally compact Hausdorff spaces (like, e.g., finite-dimensional Banach/Hilbert spaces or $\mathbb R^{n>2}$). Let $Y^X$ denote the space of all morphisms $f:X\longrightarrow Y$ with the compact-open topology. Obviously when $X,Y$ are Euclidean, the morphisms are continuous functions, when they are topological vector spaces, they are continuous linear maps, etc.
The fundamental group of $X,Y$ is trivial, and the exponential object exists.
The question: Is $Y^X$ a connected space?
 A: No, this is very false in general.  For example, if $X=Y=S^n$ ($n>0$), the connected components of the space $Y^X$ of continuous maps from $X$ to $Y$ are in bijection with $\mathbb{Z}$ (the integer corresponding to a map $f:X\to Y$ is known as the degree of $f$).  For $n>1$, $X$ and $Y$ are simply connected.  In general, determining the connected components such spaces $Y^X$ (when $Y$ and $X$ are reasonably nice, at least) is a deep geometric problem and is one of the central problems of the entire field of algebraic topology.  Just as an example, classifying all of the connected components of $Y^X$ in the case $Y=S^m$ and $X=S^n$ for arbitrary values of $m$ and $n$ is fantastically difficult and the answer is so complex we will probably never have any satisfactory complete description of it (see https://en.wikipedia.org/wiki/Homotopy_groups_of_spheres for an overview of the problem).
One case where it is true is if $X$ or $Y$ is contractible: we say $X$ is contractible if there exists a continuous map $H:X\times [0,1]\to X$ such that $H(x,0)=x$ for all $x$ and $H(x,1)$ is constant (i.e., the same for all $x$).  For example, if $X=\mathbb{R}^n$, then $X$ is contractible via the map $H(x,t)=(1-t)x$.
If $X$ is contractible, then for any $f\in Y^X$, there is a continuous map $F:[0,1]\to Y^X$ given by $F(t)(x)=f(H(x,t))$.  Note that $F(0)=f$, and $F(1)$ is the constant function with value $f(H(-,0))$.  It follows that $Y^X$ is path-connected, since every element of $Y^X$ can be connected to a constant function by a path, and all constant functions can be connected by paths since you have assumed $Y$ is simply connected (in particular, path-connected).  A similar argument shows that when $Y$ is contractible, $Y^X$ is path-connected (in fact, more strongly, $Y^X$ is contractible, without needing any hypothesis like path-connectedness on $X$).
A version of the argument above also works if you are only considering continuous linear maps between topological vector spaces, since the contraction $H(x,t)=(1-t)x$ only passes through linear maps.
A: If you ask about path connectness instead of connectness then this is a "homotopy in disguise" (side question: are path-connectness and connectness equivalent in $Y^X$?). Indeed, for reasonably good spaces (i.e. $X$ locally compact Hausdorff) every path
$$\lambda:[0,1]\to Y^X$$
induces a homotopy
$$H:[0,1]\times X\to Y$$
$$H(t, x)=\lambda(t)(x)$$
(note that $\lambda(t):X\to Y$ is a function so $\lambda(t)(x)$ makes sense) and vice versa: every homotopy $$H:[0,1]\times X\to Y$$
induces a path
$$\lambda:[0,1]\to Y^X$$
$$\lambda(t)=H_t$$
where $H_t(x)=H(t,x)$.
Under the assumption that $X$ is locally compact Hausdorff this correspondence actually defines a homeomorphism $(Y^X)^{[0,1]}\to Y^{X\times [0,1]}$ .
So the question

Is $Y^X$ a path-connected space?

is equivalent to asking

Are all continous maps $X\to Y$ homotopic?

So indeed, this does not have to hold even when both $X,Y$ are simply connected (e.g. $X=Y=S^2$). Although it does hold if for example $Y$ is contractible.
