I would first check that the battery terminals, grounds(at subframe and steering neck)and all connectors are clean and tight. I would also check that the fuses all relays all look good and that none are loose.
After checking all that, I would insure that my battery was good. Test the battery under load.
If all that checks out then you may need to dig a little deeper into the actial charging/electrical system of the bike.
Report back your findings.
Good luck