If your definition is that a space $X$ is disconnected iff it can be written as $U\cup V$, where $U$ and $V$ are disjoint, non-empty open sets, then your approach is exactly right. If $X$ is disconnected, let $U$ and $V$ be as above, and show that $X$ is homeomorphic to the disjoint union of $U$ and $V$. Depending on your definition of disjoint union of spaces, this may be completely trivial, and you can take the homeomorphism to be the identity map. At worst your definition of the disjoint union of $U$ and $V$ may be something like $(U\times\{0\})\cup(V\times\{1\})$, and there’s still a very natural homeomorphism between that and $X$, very closely related to the identity map.
For the other direction you have $X$ homeomorphic to $\bigsqcup_{i\in I}X_i$, a disjoint union of spaces $X_i$ for $i$ in some index set $I$ with at least two members. Let $h:\bigsqcup_{i\in I}X_i\to X$ be the homeomorphism. Pick $i_0\in I$, and let $U=h[X_{i_0}]$; what should $V$ be to give you a disconnection of $X$?