Bad Company 2 in every way. Except for the singleplayer, then Bad Company 1 was best.
Battlefield 3 is in many ways the last FPS I have played, and it killed all interest for another one.
It had a horrible singleplayer, and a uninteresting multiplayer.
Battlefield: Bad Company was my first real multiplayer FPS, and I played the living daylight out of the multiplayer. I also loved the singleplayer. It might not mechanically be the best, or have the best level design, but I actually liked the story.
BC2 and everything CoD tends to be "You're a proud, brave American fighting off waves of ruthless invading Russians.".
BC1 was more like "Screw the war, screw the army, screw invading Russia. Let's get ourselves a chopper, invade Sedaristan, kidnap a dictator, fight on a golf course and defeat a mercenary army. All for that sweet, sweet gold."
(On a sidenote, is BC1 and BC2 even supposed to be about the same characters?)
On the multiplayer side, I prefer BC2 over the rest of the series, but I can't really put a finger on any specific reason for it to be this way.
I guess the maps are a big issue. Grand Bazaar and Metro are the only Battlefield 3 maps I can stand.
A good portion of the maps feel too small, and cramped, while I liked a few (Metro, Grand Bazaar), linear corridorfighting is limiting. Some of the other maps are just gigantic.
I liked that BC2 had decently sized maps, and they almost always allowed you to play however you wanted.
Want to drive a tank? Sure, you can do that.
Want to be a sniper? ou can do that as well.
Want to spam explosives like there's no tomorrow? Step right up!
As I said, I can't really pinpoint a specific thing/things that made BC2 the better game IMHO, but the general "flow" (if that makes any sense) of the BC2 multiplayer is something I have yet to see in any other multiplayer FPS. Not that I play them a lot any more, and I haven't got a lot of experience with the genre, so I might not be the most qualified judge.