Diesel fuel is generally more expensive than gasoline because it is more energy-dense and has a higher octane rating. This means that diesel engines can produce more power and torque than gasoline engines, which makes them more efficient for some uses.
Additionally, diesel fuel is generally more expensive to refine, transport, and distribute than gasoline, which can also contribute to the price difference.