It is from this article. Here is the passage:
This is coming with a calorie ticket of 230, which makes legumes highly nutritious, calorie for calorie.
I can understand the phrase word for word, but calorie for calorie gives me a hard time.
A common sports idiom is pound for pound which is used to (unofficially) compare the skill of two boxers who may be in a different weight class and would not officially compete against each other.
Pound for pound, he is the best fighter even though he is only featherweight class.
It is a way to compare two or more things that are not normally compared, by adjusting for (normalizing) this one aspect.
In your example, legumes provide a high amount of nutrition compared to other foods that have the same amount of calories.