Since we want to find a homeomorphism $h$ from $\mathbb{R}$ to a closed subset of $D^\infty$, it seems natural to start with a homeomorphism $g$ from $\mathbb{Z}$ and try to extend it to all of $\mathbb{R}$ by connecting $g(n)$ to $g(n+1)$ by a nice path. If we were given $h$, its restriction to the integers, $g = h|_\mathbb{Z}$ would yield such a map.
Now it turns out that an orthonormal basis $(e_n)_{n\in \mathbb{Z}}$ indexed by $\mathbb{Z}$ yields such a $g$ for free, namely by setting $g(n) = e_n$, so this looks like a reasonable place to start.
It remains to connect these basis vectors by paths, and again the function $F$ seems to be a natural choice: In the plane spanned by the basis vectors $e_{n}$ and $e_{n+1}$ connect $e_n$ to $e_{n+1}$ by traveling along the unit circle. That's what the function $$[0,1] \to V, t \mapsto \cos\left(\tfrac{\pi}{2}t\right)e_n + \sin\left(\tfrac{\pi}{2} t\right) e_{n+1}$$ does. Now redefine this function to be defined on $[n,n+1]$ by replacing $t$ by $t-n$ and end up with the given solution
$$
F(t) = \cos\left(\tfrac{\pi}{2}(t-n)\right)e_n + \sin\left(\tfrac{\pi}{2} (t-n)\right) e_{n+1} \quad \text{ for } n \leq t \leq n+1.$$
This function is clearly continuous on each interval $(n,n+1)$ and continuity at $n$ follows from $\lim_{t \searrow n} F(t) = e_n = \lim_{t \nearrow n} F(t)$.
To understand the function $F$ geometrically, consider the time interval $[n,n+2]$. The intersection of $D^\infty$ with the $3$-dimensional space spanned by $e_{n},e_{n+1},e_{n+2}$ is a three-dimensional ball. You start at $e_{n}$ and travel eastwards along the equator a quarter-circle and end in $e_{n+1}$. Then you turn around $90^\circ$ to the left and walk along a meridian to the north pole $e_{n+2}$. Then you turn and prepare to step into the next dimension to walk towards $e_{n+3}$.
Observe that $\lVert F(t) \rVert = 1$ for all $t \in \mathbb{R}$. Moreover, $F(s) \perp F(t)$ whenever $|s - t| \geq 2$. Since orthogonal unit vectors have distance $\sqrt{2}$ by the Pythagorean theorem, we see that $\lVert F(s) - F(t)\rVert = \sqrt{2}$ whenever $|s - t| \geq 2$. From this one easily concludes that $F$ restricted to each compact interval of $\mathbb{R}$ is a bi-Lipschitz homeomorphism.
To see that $F$ is a homeomorphism from $\mathbb{R}$ onto its image and that the image is closed, suppose $x_n = F(t_n)$ are such that $x_n \to x$. We may assume that $\rVert x_m - x_n\lVert \leq 1$ for all $m,n$. But this means that $\lVert t_m - t_n\rVert \lt 2$ for all $m,n$ and we're reduced to considering a compact interval, where we already know $F$ to be a bi-Lipschitz homeomorphism. Therefore the $t_n$ must converge to some $t$ and $x = F(t)$.