Diesel Fuel is mainly used to power Vehicles and Generators. It can be used by facing the machinery and entering the inventory [Default:G], then dragging the fuel into the corresponding slot. How much a single tank fills depends on the Vehicle.
Diesel Fuel cans may also be used as impromptu Molotov Cocktails by placing the can near the desired target and shooting it. The can will explode in fiery inferno damaging everything in the vicinity.
Diesel Fuel cans are very heavy, so lugging them around without reason is not recommended. They are quite a frequent sight at gas stations, auto repair shops, garages and hardware stores.