Does Homebrew install use SSL/TLS?
You can't know for sure, at least not based on the information you shared in the question:


It's a https connection so it should be secure
Nevertheless you could connect through a network which tricked/forced you to accept a new certificate and then performed a man-in-the-middle attack
Somebody could have tampered with the script on Github, resulting in an attack within the script you've downloaded