by Orson Scott Card
Bean is a mini-version of Ender (who is already small). He’s such a mini-version that he actually gets his own book later (Ender’s Shadow). But in Ender's Game, we don’t learn much about him or his past. All we find out is that Bean is a small version of Ender: he’s brilliant and young and small even for his age. Bean also talks back and has a big ego, which is a little different from Ender. That’s how you can tell the two apart.
Later, Bean is in charge of a toon whose main job is to do crazy things and try new stunts. In at least one of Dragon Army’s games, Bean’s crazy stunts helps Ender's army to win. But that’s not really why he’s important.
Bean is important because he gives Ender a chance to do to someone else what Graff did to him. This isn’t a big secret in the book. Throughout their first interaction, Ender worries about why he’s singling out Bean and is afraid that he might be as much a bully as Bonzo or Peter. But Ender learns that isolating Bean has a purpose – and so he realizes that his own isolation had a purpose too (10.187). Which probably doesn’t make him any happier, but at least he sees the upside of it now.
And, of course, Ender’s training with Bean turns out great. Bean becomes one of Ender’s most valuable soldiers, and later one of his most valuable squadron leaders during the fight against the buggers.
Also, random fact: Bean is the only person (whom we see) having a sleepover with Ender. So Bean is here to show us a smaller version of Ender, and for Ender to show his softer, human side.