When you see a padlock and https://, TLS is doing the work. It encrypts the connection, checks that the server's certificate was issued for that domain by a trusted certificate authority, and makes sure nobody altered the data on the way. TLS replaced SSL in 1999; the current version, TLS 1.3, was finalized in 2018.

TLS matters a lot on Tor for one reason: the exit node. Tor's own encryption ends at the exit. Whatever goes from there to a normal website is only protected if the site uses TLS. Without it, the exit operator can read or change the page. Tor Browser's HTTPS-Only mode, on by default in recent releases, tries to upgrade every connection.

Tor also uses TLS internally to wrap the links between relays, though that's a separate layer from the onion encryption inside.

For onion services, TLS is mostly optional because the connection is already end-to-end encrypted and authenticated by the address. Some large sites still get certificates for their onions, which DigiCert and HARICA have issued.