They kind of got lucky in terms of talent, all four of the main cast (and a lot of the supporting cast too, particularly Hammond of Texas) were really excellent, unique characters, and their occasional arguments (mostly between Jackson and O'Neill) were very realistically handled.
O'Neill's a somewhat tormented (they carry over the plot from the movie that his son accidentally shot himself with his gun) cynical, sarcastic grizzled military badass.
Teal'c was also pretty badass and made what could have been a very generic character feel unique, and for seeming so stern he had some really good moments of humor later in the series.
Carter felt like a believable geek character and a capable soldier and as the series went on she became hotter and hotter, and so was an all around enjoyable character, and her line delivery made her believable as a genius.
Jackson was always the team's heart, always arguing for peace and compassion, and as the show went on the cast felt like genuine friends, and professional about it. It felt like a really skilled group of co-workers. While their personalities are completely different, O'Neill and Jackson had kind of a parallel to Spock and McCoy, though usually they agreed in the end.
It helped that the show didn't take itself too seriously and was willing to engage in the occasional comedy episode.
I feel like it painted a surprisingly realistic picture of the military as well, with it being populated by generally good people with the best of possible intentions who nonetheless most often think the best solution is to blow everything up (and more often than not are right) but occasionally have to deal with bureaucratic red tape and shady government officials with their own agendas.
It also helped quite a bit that the show had a lot of great, very theatrical, enjoyable and easy to hate villains.
The later seasons were kind of a mixed bag, but overall still great.