Condition to union of connected sets be connected

The hypothesis $\partial X \subseteq Y$ is even too strong. $\partial X \cap Y \neq \emptyset $ is sufficient. To prove it, suppose that $O_1, O_2 \subseteq \mathbb R^n$ are two open subsets such that $X \cup Y \subseteq O_1 \cup O_2$.

Without loss of generality, we can suppose that $X \subseteq O_1$ as $X$ is supposed to be connected. Let $a \in \partial X \cap Y$. By definition of the boundary $\partial X$, $a$ belongs to $\overline{X}$. If $a$ also belongs to $O_2$, then $O_2 \cap X \neq \emptyset$ in contradiction with $O_1 \cap O_2 \cap X= \emptyset$ as $X$ is supposed to be connected. Therefore $a \in Y \cap O_1$ and $Y \subseteq O_1$. And we get the desired conclusion.

Finally note that your willingness to prove that $X \cap Y$ is non-empty cannot work. Take for example $\mathbb R^2$, $X$ the open unit disk and $Y = \mathbb R^2 \setminus X$. $X,Y, X\cup Y$ are all connected however $X \cap Y = \emptyset$.