An inequality involving square roots and sums
For every $n\in\{1,\dotsc,N\}$, we have $$2\sqrt{\sum_{i\leq n} a_i}-2\sqrt{\sum_{i\leq n-1} a_i}=\frac{2a_n}{\sqrt{\sum_{i\leq n} a_i}+\sqrt{\sum_{i\leq n-1} a_i}}>\frac{a_n}{\sqrt{\sum_{i\leq n} a_i}}.$$ Summing these up, we obtain the inequality with $C=2$. It is also straightforward to see that for $C<2$ the inequality fails, hence $C=2$ is the optimal constant.
Rewrite your inequality as $$lhs:=\sum_{n=1}^N \frac{s_n-s_{n-1}}{\sqrt{s_n}}\le C\sqrt{s_N},$$ where $s_n:=\sum_{i=1}^n a_i$. Note that $$\sum_{n=1}^N \frac{s_n-s_{n-1}}{\sqrt{s_n}}$$ is a lower Riemann sum for the integral $$\int_0^{s_N}\frac{ds}{\sqrt s}=2\sqrt{s_N}.$$ So, $$lhs\le2\sqrt{s_N},$$ as desired.
In the above proof, it was tacitly assumed that $a_i>0$ for all $i$. This can be obviously extended to the case when we only know that $a_i\ge0$ for all $i$ -- assuming that, by continuity, $\frac{a_n}{\sqrt{\sum_{i=1}^{n}a_i}}:=0$ whenever $a_n=0$.