Why are allyl halides reactive towards both SN1 and Sn2 reactions?
In a reaction, SN2 as well as SN1 reactions take place. It only matters that which reaction pathway gives the major product. The answer to your question depends on the type of base used, the substrate and the overall stability of the product. Allyl halides are also reactive to SN2' reactions, i.e allylic nucleophilic substitution reactions. There are a lot of possibilities. 

Keep in mind that the electronegativity order of hybridized carbons is $\ce{sp &gt; sp2 &gt; sp3}$. So in an allylic halide, such as $\ce{CH2=CH-CH2Br}$, the alpha carbon is much more partially positive than the alpha carbon in $\ce{CH3-CH2-CH2Br}$. Therefore, the attacking nucleophile will be attracted to the alpha carbon more in the allylic halide compound than in the primary halide. Hence, allylic halides tend to follow SN2 pathways more than primary halides.