Not going to rank them, and I'm probably going to miss some. That said, I can probably nominate:
-Babylon 5 (best sci-fi show I've ever seen, though I haven't got round to season 5 yet)
-The Simpsons (while its best days are long behind it, I think it deserves a mention because of the heights its reached, plus the pop culture influence it achieved)
-Avatar: The Last Airbender (while other cartoons have impacted on me more, I'm going to list TLA here because of its solid writing, characters, worldbuilding, and storytelling - basically, TLA does everything right, and remains accessible to both children and adults. This deserves all the praise it gets)
-Game of Thrones (there'll be debate as to when the show declined, and I haven't seen the final season yet, and you could argue that its strengths are entirely due to the books, but still, this is easily one of my favourite TV shows. Even at its worst, it's still better than most fantasy shows I've seen)
-Futurama (I'm including this here because while Futurama didn't last as long as the Simpsons did, I'd say it did a better job of maintaining its quality. However, the reason it's here, and not in honourable mentions, is that I feel its penetration in pop culture (e.g. "shut up and take my money," "oh you were being serious, let me laugh harder," etc.) does warrant a 'best of all time' position.)
-Foyle's War (this is probably an obscure entry, but easily my favourite detective/mystery show. Well written, good characters, and while I feel it peaked at the end of WWII in its storyline, we still had solid stuff afterwards)
-Lost (people seem to rag on this show a lot; from what I can tell, it's because it kind of went off the rails in its last seasons. And while I kind of agree, I still honestly think that Lost is excellent television. We've got the mystery that's slowly unveiled, and we've got the characters, all of whom are solid, and develop/are revealed over time. I missed Lost when it came out, but binged it on DVD, and there's a reason why I binged it the way I did.)
-Doctor Who (I've actually stopped watching DW; the Eleventh Doctor thing was the final straw on a pile that had been growing since Matt Smith took over. That said, I'm still including it, because DW is a show I absolutely loved at its peak, and I still have immense respect for it at the end of the day.)
-Midsummer Murders/Death in Paradise (these are entirely fluff that are ludicrous when you get down to it, but this is favourite TV shows, not best. And yeah, I'm allowed my guilty pleasures, right?)
I'm also going to give honourable mentions - mainly from what people have listed, even if I don't consider these shows my favourite:
-Battlestar Galactica (reboot): Really like this, even if season 4 doesn't reach the heights of previous seasons. That said, not quite my favourite, as it didn't reach the emotional impact some other shows have)
-Firefly (good, if not great)
-Westworld (only seen season 1, but it's a season that's excellently written. That said, I don't know if I can call it the best, since again, only one season)
-Parks and Recreation (I like this show, but I'd say its quality is like a bell curve - it starts off weak, albeit still enjoyable, with season 1, steadily gets better to when it peaks in season 4, then starts to decline with the last season being the weakest of the bunch. So, lots of fun to watch, but still has distinct flaws)
-The Expanse (again, can't call it a favourite, but very solid sci-fi)
-Band of Brothers (solid WWII series)
-Cowboy Bebop (CB is a bit of a weird one for me, in that while I don't enjoy it that much episode to episode, I still regard the anime highly. Got a great style, and there's a theme of nihilism that comes in towards the end that's very well done IMO)
-South Park (I'm giving this honourable mention status, because like the Simpsons, South Park's managed to be both hilarious and pertinent. That said, I'm leaving the Simpsons in the top spot because while South Park's endured better in the long run as far as I can tell, the Simpsons has managed to be very heartwarming in its best moments, whereas South Park never really has. At the end of the day, if the Simpsons is the venerable dad of the genre that fell on hard times but you love all the same, South Park is the edgy son that never stopped being edgy. And Family Guy is that weird uncle you think you love, but then come to see as being a repulsive human being)
-The 100 (only seen the first two seasons, but for a show that I was initially skeptical towards due to it selling itself on teens with romance, it's astounding how well written it actually is (well, the first two seasons at least)
-The Dragon Prince (only seen the first two seasons, but as a close cousin to TLA, I feel this deserves a mention. It doesn't reach the same heights, but all the strengths of TLA can be found here.)
-Farscape (I'll always love Farscape. It peaked in season 2, but even then, there's great stuff to be found in its last two seasons. It's such a shame IMO that Farscape is today overshadowed by the likes of Firefly and Guardians of the Galaxy - both of which I like, but Farscape is the one that had sex, drugs, and killer muppets, while also lots of heart)
-My Little Pony: Friendship is Magic (you'll probably raise eyebrows here, but I'm including this because at the end of the day, MLP could have simply not tried. It could have been content to go all squee like previous generations did. Instead, we have characters that change over time, good humour, good worldbuilding, and decent morals for children, even if I didn't need those morals. I don't know if I can call MLP a great show, but I can certainly call it a very good show, and there's a reason why it appealed beyond its intended audience.)
-Pokemon (including this because I was enamored with it as a kid, and I feel it has enough influence to warrant inclusion here.)