You can, provided the soundbar has sufficient connectivity options. You’ll have no issue with most modern TVs, but if you have an older one without an HDMI or optical cable port, make sure you buy a soundbar with an AUX (analog) input.