When the film first came out, some fans noticed that BB-8 tends to act a little too much like R2-D2—and once you get around his nifty beach-ball physique, there's not a whole lot of differences between the two of them.
They're both plucky and resourceful, loyal to a fault, and ready to take one for the team whenever they need to. Both of them are found by a lonely soul on a desert planet, carry vital information in their innards that the bad guys want, and when the chips are down, are ready to go with whatever support the team needs.
So, why is BB-8 here? Why him and not R2? Well, R2-D2 is out of commission owing to another super secret set of orders from Luke, and the movie needed someone to take up the slack. And BB-8 is also a little more vulnerable in some ways: R2 was ready to fight when someone crossed him. BB-8 would prefer to quietly scoot out of the way and hope no one notices him.
The interesting thing about him is how endearing he's become. R2 and C-3PO were an odd couple for the ages, but BB-8 feels very much like a third musketeer, which is pretty impressive for a sentient beach ball.
He serves as the main way to move the narrative forward, with the villains in pursuit of him and the heroes closing ranks to make sure he stays safe. That makes him as much of a plot device as a character…but what an adorable little plot device he is.