Yes, these will connect to any device with a standard 3.5mm headphone jack, and MacBooks thankfully still have these.
Unfortunately, this particular model of in-ear headphone was discontinued a while back, so if you're still looking to get some, you'll have to find old stock or a used pair.