Remember how SN2 reactions are carried out. They happen in a conserved step in which the nucleophile attacks the electrophile from the back and simultaneously kicks off the leaving group (contrasted with SN1 where there is an intermediate). SN2 reactions favor leaving groups that are on primary carbons because this allows easier access for this conserved backside nucleophilic attack due to less spatial or steric hinderance. This is why chemicals like tert-butanol would never go through a SN2 reaction --> how would the nucleohpile reach that electrophilic carbon with all those methyl groups around it? And why chemicals like 1-pentanol go through SN2 reactions --> all that wide open space (also think about the propensity for a primary carbon to be carbocation intermediate..never!!)
1-pentanol has a primary OH, 2-pentanol has a secondary OH and thus 1-pentanol would be favored and the reaction would occur faster