MATL, 15 14 bytes
One byte saved thanks to Kevin Cruijssen's suggestion
'http://to.'Xi Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.
This can't be tested online because the Xi is not allowed in the online interpreters.
###Explanation
Explanation
'http://to.' % Push this string Xi % Return contents of that URL as a string. If there is no Internet % connection this gives an error, with no output on STDOUT