It looks from your expression as though you only have one unknown constant; since the solution is real, shouldn't we just have $C_1=C_2$ so the imaginary terms cancel?
What you might be missing is the fact that $C_1$ and $C_2$ can also be complex. Say $C_n = u_n + iv_n$ for $n=1,2$; then
$$y(x)=e^{ax} \left[\left(u_1+iv_1\right)\left(\cos bx +i\sin bx \right)+\left(u_2+iv_2\right)\left(\cos bx -i\sin bx \right)\right]$$
We do want imaginary parts to vanish for a real solution; so
$$u_1 \sin bx + v_1 \cos bx - u_2 \sin bx + v_2 \cos bx = 0$$
for all $x$. When $bx=0$, this is
$$v_1 + v_2 = 0$$
When $bx=\frac{\pi}{2}$, we get
$$u_1 - u_2 = 0$$
ie $u_2=u_1$ and $v_2=-v_1$. Dropping the subscripts,
$$y(x)=e^{ax} \left[\left(u+iv\right)\left(\cos bx +i\sin bx \right)+\left(u-iv\right)\left(\cos bx -i\sin bx \right)\right]$$
ie
$$y(x)=2e^{ax} \left[u\cos bx -v\sin bx\right]$$
You can either leave the result in this form (with $u$ and $v$ as your constants) or rewrite as
$$y(x)=Re^{ax} \cos (bx+\theta)$$
(and you can choose which depending on the situation). Hope that helps!