There are two characters in Portal 2 co-op: Atlas and P-Body, but there appears to not be a character selection screen before you start playing.
Are the characters randomly assigned to each player or is it based on something else?
At the moment it is not really possible choose the robot. The player that hosts the game is automatically assigned Atlas, the friend that joins the game has P-Body instead.
Here's what I saw: I hosted the first game with my friend. I was assigned Atlas, she was P-Body. The next time, she invited me. Again, I was Atlas and she was P-Body. The third time, I invited her. Same result: I had Atlas, she had P-Body.
My guess is that, the first time you play with someone, the inviter is given Atlas and the invitee is given P-Body. Upon subsequent plays with the same person, each keeps the same robot no matter who initiates.
I played with my brother on ps3 and me on PC. First he was atlas and I had Pbody and I was hosting. Later he tried on PC and me still on PC. At that time he invited me and I got Atlas instead of Pbody. Went back to title screen and I invited him now and I got Pbody like before.
On PS3-PC co-op, the PC is always assigned to P-Body and the PS3 Atlas so the person on the PC can't use cheats, because only Atlas can use cheats, and only PCs can use cheats.