Add class to sub-taxonomy terms
If you're using them in a form you could use this module to have much more control of your checkboxes tree and you will have different classes for parents and children:

https://www.drupal.org/project/term_reference_tree


Enable the Term Reference Tree module. 
Go to the Manage Fields tab of any fieldable entity (such as a content type, taxonomy term, or user. 
Add a new field with a type of Term Reference. 
In the widget select box, select Term reference tree.