It can be easily judged by eliminating the possibilities.
A simple rule to remember
Base gives elimination
Nucleophile gives substitution
1)Temperature:All elimination reactions are thermodynamically controlled (it is because u convert a stable compound to an unstable 1...like frm alkanes to alkenes)
2)Kinetics:All substitution reactions are kinetically controlled
3)Strength of base or nucleophile:A strong base or nucleohile gives 2nd order reactions as it attacks the carbon atom or abstracts a proton before the molecule can ionize
4)Stearic effects:Primary halides undergo 2nd order reactions as their carbocations are not stable..they usually undergo SN2 if the nuclophile is strong and E2 if the base is strong (stronger than the leaving group, as it makes the leaving group a weak base n thus a stable conjugate base n thus makes it a good leaving group)
Teritiary halides + Weak base = SN1 (SN2 is not possible as back attack is not possible due to the stearic hindrance)
Teritiary halides + Weak base+heat = SN1+E1 (SN2 is not possible as back attack is not possible due to the stearic hindrance)
Teritiary halides +Strong base=E2 (E1 not possible as a strong base gives a second order reaction)
5)Reactions with secondary halides=Mixture of products (they follow the rule bse=elimination, nuc=substitution)
6)Stearic effects on nucleophile:A bulky nucleophile cannot attack a carbon atom but can easily abstract a proton, hence bulky nucleophiles give elimination products
7)Solvent effects:good ionizing solvent or polar protic solvent gives 1st order reactions n vice versa...
(others can add some more points)