Determining whether $ L = \{ 0^n1^{n^2} | n \ge 0 \} $ is a CFL
Let $h\colon \{0,1\} \to \{0\}$ be the homomorphism given by $h(0) = \epsilon$ and $h(1) = 0$. If $L$ were context-free, so would $h(L) = \{ 0^{n^2} : n \geq 0 \}$ be. Since $h(L)$ is a unary language, it would be regular. However, a unary language is regular iff it is eventually periodic, which it isn't. Therefore $L$ cannot have been context-free.

More generally, if $L$ is context-free then:


The set of lengths of words in $L$ is eventually periodic.
The set of number of occurrences of a symbol in $L$ is eventually periodic.


The most general statement of this kind is Parikh's theorem.