Can a Pokemon learn a TM move by breeding instead of using a TM? For example, Treecko can learn energy ball by level up or TM, but can it learn energy ball by breeding instead?
Prior to Generation VI, if the father knows any moves that are TMs or HMs in that game (and in Crystal, moves that are taught by a Move Tutor) that the baby is also compatible with, it will inherit the move. If a Pokémon species that is gender unknown (such as Magnemite) breeds with Ditto, the resultant baby will inherit any compatible TM or HM moves that the non-Ditto parent knows.
Since Black/White, this feature was made obsolete thanks to TMs now becoming reusable, so X/Y and all preceding games no longer allowed for TMs to be passed down through breeding. This however still applies to all modern games where TMs are no longer reusable, such as Brilliant Diamond/Shining Pearl and Scarlet/Violet.
Source
As long as the male knows the TM move, and the baby can learn the TM, the baby will know the TM. So if you breed a Male and Female Treecko/Grovyle/Sceptile together, and the male knows Energy Ball, the baby Treecko will know it.