You don’t have to show that $f$ is continuous in order to conclude that $\mathcal{C}$ is uncountable: that follows from the fact that $f$ is surjective, assuming that you know that $[0,1]$ is uncountable. Your argument for surjectivity is correct, though it could be stated a bit better, but for clarity you ought to deal with a point raised by Dan Brumleve. Here’s your argument, slightly restated:
Let $y\in [0,1]$ be arbitrary, and let $(0.y_1y_2\dots)$ be a binary representation of $y$. For each positive integer $i$ let $a_i=2y_i$, and let $x$ be the number whose ternary representation is $(0.a_1a_2\dots)$; then $y=f(x)$, so $f$ is surjective.
Since this looks at first sight as if you were actually constructing a function from $[0,1]$ to $\mathcal{C}$, it would help the reader if you were to point out that this isn’t the case. For example, $y=1/2$ has two binary representations, $0.1\bar{0}$ and $0.0\bar{1}$, where the bar indicates a repeating digit, so it’s both $f(0.2_{\text{three}})=$ $f(\frac23)$ and $f(0.\bar{2})=f(\frac13)$.
As I said, continuity of $f$ isn’t needed if all you want is to prove the uncountability of $\mathcal{C}$, but if for some other reason you have to prove the continuity of $f$, here’s one approach. For $x\in\mathbb{R}$ and $r>0$ let $B(x,r)=\{y\in\mathbb{R}:\vert y-x\vert\le r\}$. Suppose that $0.x_1x_2\dots$ is the $1$-less ternary expansion of some $x\in\mathcal{C}$. For $n\in\mathbb{Z}^+$ let $T_n(x)=$ $\{(0.a_1a_2\dots)\in\mathcal{C}:\forall i\le n [a_i=x_i]\}$. Show that $$B(x,3^{-(n+1)})\cap\mathcal{C}\subseteq T_n(x)\subseteq B(x,3^{-n})\cap\mathcal{C}.$$ Then show that for each $r>0$ there is an $n(r)\in\mathbb{Z}^+$ such that $T_{n(r)}(x)\subseteq B(f(x),r)$.
Another approach is to show that $f$ preserves convergent sequences, i.e., that if $\langle x_n:n\in\mathbb{N}\rangle$ is a sequence in $\mathcal{C}$ that converges to $x\in\mathcal{C}$, then $\langle f(x_n):n\in\mathbb{N}\rangle \to f(x)$ in $[0,1]$. A good first step would be to show that if $\langle x_n:n\in\mathbb{N}\rangle$ is a sequence in $\mathcal{C}$ that converges to $x\in\mathcal{C}$, then for each $m\in\mathbb{Z}^+$ there is an $n(m)\in\mathbb{N}$ such that $x_n\in T_m(x)$ whenever $n\ge n(m)$: that is, every term of the sequence from $x_{n(m)}$ on agrees with $x$ to at least $m$ ternary places. Then each term of $\langle f(x_n):n\in\mathbb{N}\rangle$ from $f(x_{n(m)})$ on agrees with $f(x)$ to at least $m$ binary places. From this it’s not hard to conclude that $\langle f(x_n):n\in\mathbb{N}\rangle \to f(x)$.
I’m going to assume that Cantor set here refers to the standard middle-thirds Cantor set $C$ described here. It can be described as the set of real numbers in $[0,1]$ having ternary expansions using only the digits $0$ and $2$, i.e., real numbers of the form $$\sum_{n=1}^\infty \frac{a_n}{3^n},$$ where each $a_n$ is either $0$ or $2$.
For each positive integer $n$ let $D_n = \{0,1\}$ with the discrete topology, and let $$X = \prod_{n=1}^\infty D_n$$ with the product topology. Elements of $X$ are infinite sequences of $0$’s and $1$’s, so $(0,0,0,1)$ and $(0,1,1,1,1,1,1)$ are not elements of $X$; if you pad these with an infinite string of $0$’s to get $(0,0,0,1,0,0,0,0,\dots)$ and $(0,1,1,1,1,1,1,0,0,0,0,\dots)$, however, you do get points of $X$. A more interesting point of $X$ is the sequence $(p_n)_n$, where $p_n = 1$ if $n$ is prime, and $p_n = 0$ if $n$ is not prime.
Your problem is to show that $C$, with the topology that it inherits from $\mathbb{R}$, is homeomorphic to $X$. To do that, you must find a bijection $h:C\to D$ such that both $h$ and $h^{-1}$ are continuous. The suggestion that you found is to let $$h\left(\sum_{n=1}^\infty\frac{a_n}{3^n}\right) = \left(\frac{a_1}2,\frac{a_2}2,\frac{a_3}2,\dots\right).$$ Note that $$\frac{a_n}2 = \begin{cases}0,&\text{if }a_n=0\\1,&\text{if }a_n=2,\end{cases}$$ so this really does define a point in $X$. This really is a bijection: if $b = (b_n)_n \in X$, $$h^{-1}(b) = \sum_{n=1}^\infty\frac{2b_n}{3^n}.$$
Best Answer
There are, of course, things to nit-pick about your presentation, but the proof itself is entirely correct. Here are the three things that I saw and thought could've been better:
You should be clearer on what $(a_1,a_2,\ldots)$ is. It is the ternary expansion of a point in $C$ with the restriction that $a_i\neq 1$ for all $i$. It's implicitly understood, but I think it is better to state explicitly. The fewer things a reader has to guess (no matter how certain you are that you guessed right), the better.
Perhaps you should have a short justifying sentence for each of well-definedness and injectivity, just to be safe. Well-definedness hinges on the uniqueness of the ternary expansion (as long as we require no $1$'s), and injectivity on the fact that two real numbers with the same expansion are equal.
Your surjectivity proof is explained via an example. This is better to do generally. Say we have a $U\subseteq \Bbb N$, and we then define $x = \sum_{n = 1}^\infty a_n3^{-n}$ where $a_n =2$ iff $n\in U$ and $0$ otherwise. Then $x\in C$, and we get $f(x) = U$. (Whether you want to prove that $x\in C$ and $f(x) = U$ is completely up to you.) After that you are free to do an example to illustrate.