There is no doubts the TNG cast get along the best. I mean they're all still close 25 years after first working together which is unheard of in Hollywood. Watching the 25th anniversary reunion special on the Bluray you can tell these people really like being together.
As for the cast that got along the least well, it would probably be the TOS. I think Nimoy, Shatner and Kelly got along fine, but the rest of the cast pretty much loathed Shatner.
The DS9 cast were not close but I don't think there were any conflicts, they simply were coworkers rather than friends. Though I do think Nana, Rene, Alexander Siddig, Micheal Dorn and Armin are fairly good friends. I was watching one of Shatner's documentaries and there was a scene with Terry Farrell, Rene and Nana in a room together before going on stage at a convention and Rene and Nana comment that its been at least 10 years since they say Terry.
The VOY cast seemed to be very close (more like the TNG cast) for the first years until Jennifer Lien got fired and they brought in Jeri Ryan. It's no secret Kate Mulgrew was deeply unhappy about it and Kate was very hostile towards Jeri Ryan the whole of Jeri's time on set. Now, I love Kate Mulgrew but I've gathered from little bits and pieces from the cast over the years that many of them found her hard to work with at times. But I do think out of the original cast, most of them get along fairly well.