I'm not sure about that one, and I can't find any explicit text in the rules.
I know that regular HD for improved monsters also improves one ability by one point every four Hit-dices, but is it also true for "bonus HD" that the animal companion gets?
I found this in the SRD. it mentions everything besides ability scores. Do you know where I can find an explicit text in the rules?
Bonus HD
Extra eight-sided (d8) Hit Dice, each of which gains a Constitution modifier, as normal. Remember that extra Hit Dice improve the animal companion’s base attack and base save bonuses. An animal companion’s base attack bonus is the same as that of a druid of a level equal to the animal’s HD. An animal companion has good Fortitude and Reflex saves (treat it as a character whose level equals the animal’s HD). An animal companion gains additional skill points and feats for bonus HD as normal for advancing a monster’s Hit Dice.
What speaks against just assuming it is this text from the FAQ:
The animal companion rules — or, for that matter, pretty
much any other effect that grants a creature bonus Hit Dice —
don’t use the monster improvement rules presented in Chapter
4 of the MM. The rules in MM are for creating tougher versions
of existing monsters, not for increasing the statistics of
creatures who gain Hit Dice.An animal’s normal advancement line has absolutely
nothing to do with the benefits it gains from being an animal
companion, and vice versa. A wolf animal companion doesn’t
become size Large when its Hit Dice increases to 4, nor is it
limited to the “normal” Hit Dice cap for wolves.
Best Answer
Yes, you increase Animal Companion's ability score when advancing it by HD.
The rules for Animal Companion bonus HD state explicitly which benefits it receives as normal for advancing a monster's Hit Dice. That allows to conclude, following the logic of the D&D system, that other benefits are not gained as normal, and therefore size and ability scores are not increased per bonus Animal Companion HD.
However, this article explicitly says that Animal Companions advance as normal per HD, except size. This raises a question of source precedence, and as for me, the mentioned WotC article specifically regarding Animal Companions is a primary source.
A quote from the article in question, for convenience:
Note: Pathfinder Druid has this covered.