The only significant contributors to calories and mass of any food item are water, proteins, carbs, and fat. They are respectively 0, 4, 4, and 9 calories per gram. So, foods that are waterlogged (fruits and veggies) are very low calories per gram and foods that are fattier will be denser.
Honestly curious: Is there more discussion to be had than that?