1- Fuels with higher sulfur content such as visbreaking oil or black oil (with high sulfur content) have higher calorific value than ones with lower sulfur content such as diesel and kerosene. The main reason for that is the higher content of heavy aromatic molecules in the fuels with higher sulfur content.
2- Hydrotreating process (for example hydrotreating of diesel using hydrogen) is a exothermic reaction in which heavy aromatic molecules are hydrogenated or cracked to lower ones. This process is exothermic. It can be concluded that ULSD (ultra low sulfur diesel, 10 ppm S content) has a lower energy content than the Euro 4 (50 ppm S content) diesel;but, it is ignorable and strongly dependent to the extent of hydrotreating process, and sulfur content of feed.
Altogether, any impurity that reduces the heat value of the oil (the same story exist for gas and coal) is a disadvantage and reduces the total price of the product. Besides, sulfur burning will lead to production of sulfur oxides which are toxic and dangerous for end users. This impurities are more significant in trading stuff.
This is basic first year chemistry. Check the chemistry handbook. (1) The heat of combustion of CO2 is 4 times that of SO2. (2) MW of S is 32, C is 12. Therefore, regardless of crudes or refined products, those with high heteroatoms contents will high lower calorie values.