I've found out that I can't just use a retail CD-Key for Bad Company 2 in Steam.
However, is there a way to integrate with Steam, so I can for example easily play BC2 with Steam friends?
If you go your steam library and select "Add a game"->"Add a non-steam game" then find the executable for BF:BC2, this will show your friends when you are playing BC2. You will also be able to access the in-game overlay for PMing your steam friends and using the browser. Sadly, it won't show any details about the server you are on, just that you are playing it.
This is the best you can currently integrate non-steam games into steam (games that don't have a steam-activatable key, at least).
If I remember correctly BC2 has an in-game friends list. Have all your friends add each other to their in-game friends list and then you can join the same games right from inside the game, Steam or no Steam.