I would like to know the best way to apply sharepoint branding to mysites in both on prem and office 365, do we use feature stapling or we use a provider hosted app for that? what's the best approach?
The supported approach to customize My Sites is to design a Feature and then use Feature Stapling to associate that Feature with the site definition. For example, you might design a Feature that uploads and uses a custom master page for My Sites, and specifies certain Web Parts that you want available for users on their My Sites.
I would go with feature stapling and for the SPO i would go for hosted app.
Please read more over here: