There are several ways to put your attribute points when leveling up.
Putting all the point in Attack is a popular choice and there is absolutely nothing wrong with this choice. Obviously there are other options available if a bit of variety is desirable.
This refers to building a companion up according to their strength in terms of stats, Offensive with Attack, Tanks with HP and Healers with Heal. Building a companion up according to strength allows the character to be more specialized according to their role.
Strengthening out the weaknesses of the companion. Level up the weakest stats of the companions. This forgoes specialization and allows for a more balanced team build.
Balance companions can be specialized or remain balance for the purpose of balance team building.
Synergising the stats according the abilities can also be a good idea, for instance some characters have abilities converting colour gems to pink gems, improving the heal of the such companions could prove to be useful due to the likelihood that using such abilities would be in situations where healing is required. On the other hand, companions with healing abilities might not need as much heal through stats due to the use of their ability. Furthermore companions with healing abilities that recover certain % of max HP are probably better off improving their HP as this increase the amount of HP recovered using their healing abilities.