The Diesel Engine is known for more power and better efficiency. Now the reasons why the diesel engine produces more torque are listed below.
In both the engines when the piston moves towards the T.D.C, The Piston of the Diesel Engine compresses the air further more than its T.D.C. This is because in the diesel engine for instant combustion of the fuel heat of the air is required. Thus it raises the temperature above its self-ignition temperature for self-combustion. While in a Gasoline engine we do not require the air to be compressed more as a spark plug is used to ignite the fuel-air mixture and combustion to take place.
The following graph will show the efficiency of the Diesel Engine is more with respect to compression ratio:
As we know in a gasoline engine the spark plug ignites and the flame travels till it burns all the air-fuel inside the cylinder whereas, in a diesel engine, complete combustion occurs as soon as the fuel is injected in thus combustion occurs much sooner.
That is, in a diesel engine the fuel spends more time in pushing down the piston whereas in gasoline engine translates into useful work. In the gasoline engine if the combustion still occurs (suppose at a point A) that will move the piston down for short duration only. But if it would have occurred at the top it would have moved the piston for the entire length. So the compression ignition property of the diesel engine gives more torque.