Why can toluene be chlorinated at either the benzylic position or the ring depending on the conditions?
The halogenation of toluene is possible by two mechanisms. In German, they are referred to by the shorthands KKK and SSS, where KKK stands for Katalysator, Kälte, Kern (catalyst, cold and core) while SSS is Sonne, Siedehitze, Seitenkette (sun, sizzling heat and side chain).

At low temperatures and in the presence of an activating catalyst such as $\ce{FeCl3}$, halogenation of toluene will typically occur as phenyl ring halogenation following the electrophilic aromatic substitution mechanism.


Scheme 1: Catalytic chlorination of toluene with $\ce{Fe^3+}$ as a catalyst. ortho- and para-products expected; (para not shown) mesomeric structures of the intermediate not shown.

Und higher temperatures and irradiation, halogenation takes place according to a radical chain mechanism.


Scheme 2: Radical chlorination of toluene under irradiation. Multiple chlorination possible. Mesomeric structures of the benzyl radical not shown.



The electrophilic aromatic substitution is, of course, not as easily possible on the benzylic carbon; we would somehow need a free electron pair to appear there — not likely.

On the other hand, if a chlorine radical attempted to remove a hydrogen of the phenyl ring, that would result in a radical that cannot be delocalised (the $\ce{C-H}$ bond is orthogonal to the π-system) which is therefore very unstable. Another way of looking at it is to consider the $\ce{C–H}$ bond strengths: weaker bonds are more easily cleaved homolytically, as is the case in free-radical halogenation. Aryl $\ce{C–H}$ bonds are roughly $\pu{100 kJ/mol}$ stronger than benzylic $\ce{C–H}$ bonds (Wikipedia), so radical abstraction preferentially occurs at the benzylic position.