Well, a sum of all numbers from 1 to $x$ is $x(x+1)\over2$.
Let's say we have a series of consecutive numbers from $n$ to $m$ (inclusive). What is their sum? Apparently, that's the sum of all numbers from 1 to $m$ minus the sum of all numbers below $n$, that is, from 1 to $n-1$. In short, that would be ${m(m+1)\over2}-{(n-1)(n-1+1)\over2}={m^2+m\over2}-{n^2-n\over2}={m^2-n^2+m+n\over2}={(m-n)(m+n)+m+n\over2}={(m-n+1)(m+n)\over2}$
That's it; if you want to test a number $k$, you look at $2k$ and check in how many ways it can be represented as a product of two factors with different parity (since $m+n$ and $m-n+1$ must have different parity). That would be the number of ways $k$ can be represented as a sum of consecutive numbers (including the trivial way with one consecutive number, so subtract 1 if you want to exclude that). If you want to actually see the sums (rather than just counting them), assume that your factors are $m-n+1$ and $m+n$, and work your way back to $m$ and $n$.
The task can be simplified a little more. Apparently, one of these factors must be even; then the other is odd. So you may just count the number of odd divisors of $2k$. But wait, these must also divide $k$, so it all boils down to this: count the odd divisors of $k$.
Let's check: 105 has 8 odd divisors (the smallest number which has that many), hence
$$\begin{array}{rl}105&=\\
&=1+2+3+4+5+6+7+8+9+10+11+12+13+14\\
&=6+7+8+9+10+11+12+13+14+15\\
&=12+13+14+15+16+17+18\\
&=15+16+17+18+19+20\\
&=19 + 20 + 21 + 22 + 23\\
&=34 + 35 + 36\\
&=52+53
\end{array}$$
As for the titular question: powers of 2 have only one odd divisor (which corresponds to the trivial decomposition, which you don't want), prime numbers times a power of 2 have two (which means only one non-trivial), so the answer is: all of them except $2^k$ and $p\cdot 2^k$. In other words, take a number; if it is even, divide it by 2 until it ceases to be even. If you end up with a composite number, then the original number could be written as a sum of consecutive numbers in more than one way.
Oh, and I took it for granted that you don't allow negative numbers, otherwise the number of solutions doubles (a sum from -5 to 15 is the same as from 6 to 15), and the answer changes to: all except the powers of 2.