Allyl (CH2=CH-CH2X) and benzyl (PhCH2X) halides are reactive in BOTH SN1 and SN2:
SN1: The carbocation is resonance-stabilized (allylic: charge delocalized over C=C; benzylic: over aromatic ring). Fast ionization.
SN2: The transition state benefits from stabilization by the adjacent pi system. The p-orbital of the developing bond can conjugate with the pi system.
Allylic rearrangement (SN1): CH2=CH-CH2X → [CH2=CH-CH2+ ↔ +CH2-CH=CH2] → product can form at EITHER end of the allylic system. This gives a mixture of normal and rearranged substitution products.