The tangential force acting on the pulley is the friction F between the pulley and the string.How is that the torque applied by friction is equal to the torque applied by the difference in tensions ?
**The previous answer I had posted was completely wrong
Consider an elemental length of string wrapped around the pulley. We know that the string is massless(light - its an approximation). There is a tension acting on the string $T+dT$ from one side and $T$ from the other side.(There is a small change in tension because we have considered a small part of the string only). There is a small amount of friction $df$ acting on this string.
The force equation of this string is as follows.
$$T+dT-T-df=dm\cdot a$$
We know that $dm=0$ so,
$$dT=df$$
Integrate both sides and you get
$$f_{\mathrm{total}}=\Delta T=T_2-T_1$$
Say you have a weight tied to each side a a rope which is strung over a pulley with friction. Here's a really easy way to see why the tensions on each side of the rope can't be equal.
Imagine a really stiff pulley - in other words, ${\bf F}_\text{friction}$ is high. If that's the case, it'll be possible to balance unequal loads on this pulley system - i.e. a heavy weight on the right side and a lighter weight on th left - without the system moving. If the weights don't move, then we can say that the forces acting on each weight add up to zero:
For the heavy weight, there's the weight downward, ${\bf w}_\text{heavy}$ and there's the tension of the right side of the rope upward, ${\bf T}_\text{right}$. The tension pulls up and the weight down, and the system doesn't move, so
$$ {\bf T}_\text{right} - {\bf w}_\text{heavy} = 0
$$
or
$$ {\bf T}_\text{right} = {\bf w}_\text{heavy}
$$
Similarly for the left (light) side,
$$ {\bf T}_\text{left} - {\bf w}_\text{light} = 0 \quad \Rightarrow \quad{\bf T}_\text{left} = {\bf w}_\text{light}
$$
As you can see, the tension on the right, ${\bf T}_\text{right}$ is equal in magnitude to the heavy weight, while the tension on the left, ${\bf T}_\text{left}$ is equal to that of the lighter weight. The friction is introducing an extra force which changes the tensions on each side.
As far as your question about rope stretching goes, if you anchor a rope on one side and pull, the rope will pull back, creating a tension. This is indeed because of stretching in the rope. This is not really what Newton's 3rd law is referring to. Newton's third law, in this case, tells us that the force that we feel from the rope, tension, is exactly the force the rope feels from us pulling. The two are equal and opposite. You can change the tension by changing the stiffness of the rope, but whatever the tension, Newton's 3rd law will still be true - the rope will feel us pulling it as much as we feel it pulling us.
Best Answer
What we mean by a frictionless pulley is that the friction in the bearings of the pulley is negligible, and the pulley is free to rotate without any resistance. We don't mean that the friction between the string and the pulley surface is negligible. In fact, we assume that there is enough static friction between the string and pulley surface to prevent the string from slipping. But, in this case, if you do a moment balance on the pulley, you must then conclude that the tensions in the string on either side are equal (even if the pulley has angular acceleration), since the moment of inertia of the pulley is assumed to be zero.