This could be anything I had this problem once and it ended up being my throttle body just needed to be cleaned. But I would start with cleaning the battery connections too.. The altenator could be starting to go out too, cause when your on your brakes its lighting up the brake lights...