Yes, absolutely they work. Anything that will provide the intensity and spectrum needed by coral will work. Doesn't matter how much you spend, the coral doesn't care.
When you spend more than the black boxes the advantages generally are:
1. UL Listing and Safety. The black boxes are not UL listed, meaning they have not been tested by UL LLC, which is a third party testing company that certified electronic devices as being safely designed in terms of fire risk. The importance of this is debated, but essentially you're buying a box of wires that no one other than the manufacturer has bothered to inspect to see if it was designed and made in a safe manner that won't burn your house down. Now, out in the wild, there have been cases of fires or melting due to these lights, but there still seem to be very rare. Also note that not all of the brand name lights are UL listed either.
2. Configuration. For the black boxes choices of spectrum intensity is limiting at times and if you don't have a ton of control over schedules and spectrum intensity. With a more expensive light like something by AI, you can set intensity of each wavelength exactly throughout a set 24 hour schedule, plus other bells and whistles. The black box I believe allows scheduling but it in more limited ham-fisted manner.
3. Quality. Generally speaking a light by AI of Kessel are going to be made of higher quality components and have a more aesthetically pleasing design. I would trust an AI Hydra 26 to last longer and run cooler than a black box.
4. Par uniformity and spread. BRS did a video I believe with the black boxes and did find that something like an AI Prime or Hydra 26 has a much more even PAR distribution and spread than the black boxes. So while the black boxes DO provide enough intensity and the correct spectrum, they're not as uniform, so coral placement can become trickier in theory.
5. Warranty. Name brand manufacturers will stand behind the product and warranty. If your black box from eBay fails after a month 9 times out of 10 you're out of luck despite whatever warranty paperwork comes in the box.
If you can truly afford a name brand light, I would recommend it considering the potential safety risks and overall build quality and longevity. However if you cannot afford expensive lighting the black boxes will grow coral just fine as they have for thousands of others, including many successful reefers on this forum.
I'm currently a 32 year old upper middle class professional that can afford AI lights without too much trouble, so I do because I like those things I listed. However, 10 years ago I was a college kid with 2 reef tanks and used Chinese black box T5 lights. It was the same debate then. However, they were cheap and grew corals.