According to Forbes, Universal Studios Hollywood partnered with the Intel Drone Group, which had experience putting on drone light shows, with the express purpose of lighting up the sky with the stag Patronus that Harry Potter shared with his father James.
It is actually achieved thanks to the magic of technology, specifically dozens of drones that emit the bright lights that makeup Harry’s brilliant stag Patronus.
It is obviously (and sadly) not real magic though.