Why do frequencies of analog signals range from $-\infty$ to $\infty$ while frequencies of digital signals are restricted to $[0,2\pi]$?
The digital frequency span of 0 to $2\pi$ is the normalized angular frequency given in units of radians per sample.  For example, if we had a frequency tone that went $0.2\pi$ radians/sample, then it would take 10 samples to complete 1 cycle. So if we sample a sine wave with the result of having 10 samples in one cycle of the sine wave, the normalized radian frequency in that case is $0.2 \pi$. 

Consider an analog signal expressed as:

$x(t) = \cos(\Omega t)$

Where $\Omega$ represents the analog angular frequency $\Omega = 2\pi F$, with $F$ being the frequency in Hz. 

When we sample this signal at the sampling rate $F_s$, the sampling interval is $T_s= \frac{1}{F_s}$.

Therefore the discrete time signal is given as 

$x(nT_s) = \cos(\Omega n T_s) = \cos (\frac{\Omega}{F_s}n)$

Which can be described as 

$x(n) = \cos(\omega n)$

with $\omega$ being the "normalized frequency" $\omega = \frac{\Omega}{F_s}= 2\pi \frac{F}{F_s}$

Similarly, we can describe the digital frequency span in cycles per sample, and in this case the unique span would extend from 0 to 1, or if we prefer -0.5 to 0.5. (In comparison to radians per sample with a unique span from 0 to $2\pi$ or $-\pi$ to $\pi$.

Here is a real example I have that will hopefully make this clearer: 



The figure below of a different example shows a digital spectrum as an "unwrapped view" extending from plus or minus infinity. This demonstrates the aliases that would exist for an arbitrary spectrum that exists with a spectral density from -3 to +3 Hz when sampled at 10 Hz. This is the meaning on "Unique Span" mentioned above; the portion of the frequency spectrum that is unique (and everything beyond is just replicated).



As @Fat32 will attest, I find it much easier to visualize individual frequencies as complex tones ($e^{j\omega t})$, specifically rotating phasors on an IQ plane, rather than cosines or sines such as $\cos(\omega t)$. (Which we see through Euler's identity consists of two spinning phasors). A single tone $e^{j\omega t}$ is a phasor rotating counter-clockwise versus time on the complex plane at rate $\omega$ radians per second. Consider cases of this as a sampled system in the plot below and see how useful and straight forward the idea of normalized frequency is!

Below we have a 3 Hz analog signal represented by $e^{j2\pi f t} =e^{j6\pi t} $, with different sampling rates resulting in different normalized frequencies.







Woahh!!! What happens here??? Now we see aliasing as it really should be shown wrapping around from the positive to the negative frequency (rather than "folding" back in) but that is another topic!