If it's consensual (meaning for me, it pretty much is entirely contained to a full-premade in a multiplayer game with no-all chat), sure, some banter is fine. I think the only time I've ever gone beyond that was back during Left 4 Dead/L4D2 private servers with all-chat enabled & my friends would pretty much play troll comps on rare occasion - and even then it wasn't trash talk, as much as it was intentionally obtuse & unhelpful comms pretending we were on the opposing team (and even that was in the "ruining it for others" camp).
In almost every other case I've personally witnessed, it is fucking miserable to experience and can outright ruin evenings for your teammates and the people you face. Especially if the person who's doing it thinks they are "justified" or that they are that funny - they never ever are and it blows.
Took me a long time to realize it, but if you want to see some cool shit, try being openly egregiously kind and patient in a multiplayer game that has voice chat. You will be surprised on how much it can transform the entire vibe of what you are playing, even if they are pubbies.