Why does a photon have linear momentum, although it doesn't possess mass? We know that photon doesn't possess mass. But it has a tendency of colliding with surfaces, as we see in the photoelectric effect. As it doesn't possess mass, then how does it have linear momentum?

$E=mc^2$ and $E=hc/\lambda$

$mc = h/\lambda =p$

Here $m=0 \Rightarrow p=0$.
But photons can collide.
The formula for the momentum, $p = mv$ is only valid in the context of classical mechanics. For photons, energy and momentum are related by $E = pc$, which, because $E = hv = \frac{hc}{\lambda}$ leads to the following formula: $p = \frac{h}{\lambda}$. So the momentum is always non-zero and depends only on the wavelength.

See this Wikipedia page for more details.