Suppose $M$ is a smooth submanifold of $\mathbb{R}^n$. Through some transversality tricks, I was able to prove that if $\dim M<n-2$, then $\mathbb{R}^n\setminus M$ is always connected and simply connected.
This motivates me to ask is it true that if $\dim M\geq n-2$, then $\mathbb{R}^n\setminus M$ is not connected and simply connected? Even looking at some small cases, if $\dim M=0$, say $M$ is a finite number of points, then although $\mathbb{R}^2\setminus M$ is connected, it is not simply connected since it retracts onto a wedge of circles. I was told does indeed follow from mod-$2$ intersection theory, but I don't see how to apply that here.
First of all: 1-connected = connected and trivial fundamental group, so "connected and 1-connected" is redundant.
Now if the codimension is 1, then the following statement holds: $M^{n-1} \subset N^n$ submanifolds both closed oriented, then $M$ is seperating (i.e. the complement is not connected) if and only if $i_*([M]) = 0\in H_{n-1}(N)$. To show this you basically use $mod2$ intersection theory by saying that if you can find a loop in $N$ that does intersect $M$ precisely odd times, then $M$ is not nullhomologous in the sense above. (Note that if $M$ is non-seperating you can always find a loop intersecting $M$ precisely once, since the normal bundle is trivial).
Apply that to the contractible space $\mathbb R^n$ and since homology is a homotopy functor, $M$ is nullhomologous in there. Hence the result.
Now for codimension 2 a similar argument yields that it is not 1-connected. However, the complement is 0-connected, since e.g. the 2-dimensional normal bundle minus the zero section is, or by another argument you could also use transversality for paths and $n-2+1 \neq n$.