If you buy one off Amazon they will usually include what you need to connect. It consists of the wires to connect to the battery, a relay, and a switch. They're not hard to hook up at all. Make sure you have the right bracket/mount.
^^^^^^^^^^^^^^^^THIS ^^^^^^^^^^^^^^
If it is an ATV just zip tie the wiring to the roll cage with black wire ties instead of drilling holes in anything.
I have 5 of the 18" bars on my side by side on 4 switches (front, each side, & back). I installed the switches that came with the wiring harnesses into the plastic dash and wired the harness directly to the battery.
The only other thing I'd recommend doing is sealing the light bar really good by using a high grade clear silicone and putting it all the way around the lens as well as any other joints on the light bars. By doing this I've never had one fog up or get any kind of moisture within it at all.
The only issue I've had is a dead battery one morning as one of my barn cats must have jumped up on the dash and hit one of the light switches. lmoa