Oh yeah. It's How Lunchbox Jones Saved Me From Robots, Traitors, and Missy the Cruel, by Jennifer Brown. I may not always correctly remember the title of this book, but the story itself is very memorable!
Luke is depressed and angry because his big brother, Rob, is abandoning him to become a Marine (hence the "traitor" part of the title). He doesn't really want to do anything other than play Alien Onslaught with his online friend, Randy.
Luke's Life Skills teacher, Mr. Perry, specifically seeks him out to join the Forest Shade Middle School robotics team (hence the "robots" part of the title). Considering Forest Shade is the losingest middle school in history, Luke doesn't think the team has a chance at winning, and plus, he would much rather slaughter aliens with Randy. But he doesn't have much choice when Mr. Perry ropes his dad into his plans to recruit Luke.
So Luke joins the robotics team, and to his horror learns that the scariest guy in school, Lunchbox Jones (hence the "Lunchbox Jones" part of the title) is part of the team, and so is the meanest girl, Missy the Cruel (hence the "Missy the Cruel" part of the title).
Does Luke dare to team up with these two and the other ragtag team of kids? Will this ragtag team indeed be able to build a robot to the point that it could possibly stand up in competition? And what makes Lunchbox Jones so scary, anyway?