i've seen this expression a few times online and don't really understand what it means.
То ли дело means "it's quite a different matter; it's another thing altogether; what a difference". It is used in comparisons, what follows
то ли дело is shown as really contrasting the thing that precedes that phrase. Usually what follows
то ли дело is shown as being much better than what precedes it:
[fact 1], то ли дело [fact 2]
[fact 2] is better than [fact 1]
В городе скучно, то ли дело в деревне. Staying in town is quite boring, staying in the country is quite a different matter. (That is, staying in the country is much less boring than staying in town.)
A couple of examples from Russian famous writers:
Истина-то не всякому достаётся - поди, добивайся! - пожалуй, за неё и десятью копеечками со строчки не отбояришься! То ли дело обман! Знай, пиши да обманывай. (М. Салтыков-Щедрин, Обманщик-газетчик и легковерный читатель) — Not everyone is up to the job of writing truth. Anyhow, just go and try to find it. It's more than likely that you wouldn't even get it for a kopeck a line. But lies - that's a different matter. Just scribble away any nonsense you like.
Светлову шёл тридцать шестой год, но сейчас ему можно было дать все сорок. Лысый, располневший, с почти квадратной фигурой мужчина - кому он нужен! Соня права. То ли дело Ветрин! (И. Забелин, Без свидетелей) — Svetlov was getting on for thirty-six, but now you could have given him all of forty. Bald, stout, with an almost square figure, who cared for him? Sonya was right. Vetrin was another man altogether.