During the Wakanda battle in Avengers: Infinity War we see Bruce Banner piloting a Hulkbuster Suit to fight off Thanos's army.
How did he get the Hulkbuster Suit? Did Tony give it to him at some point?
Banner helped Tony design the Veronica system that the Hulkbuster Armour is descended from in the first place.
Tony talks to him about it close to the beginning of Age of Ultron. Banner had to have some access to the systems that govern it, and by extension access to Tony's overall network. Banner isn't as good as Tony but he's not bad with a computer by any means, so having been granted access to the system once he's not going to be kept out later. Plus Tony's system and by extension his suits are run by decently intelligent A.I.s who can and do gate keep very effectively.
We haven’t seen the suit since Avengers: Age of Ultron, but it was probably stored at Avengers headquarters. (As we saw in Spider-Man: Homecoming, Tony Stark sold Stark Tower in New York, and had Happy Hogan transport everything to Avengers headquarters.)
Bruce was at Avengers headquarters, with Rhodey, when Captain America and friends arrived. When they decided to take Vision to Wakanda to attempt to remove his Infinity Stone, Banner and/or the rest of the team most probably decided to take the Hulkbuster suit too, in case they needed it. Which they did! (This is not their first day on the job.)
In Avengers: Age of Ultron, it is stated that Tony and Bruce collaborated on the design of the Veronica/Hulkbuster system. We see that the armor and related containment measures are stored in an orbital support platform, awaiting a trigger to send the armor anywhere on Earth when necessary. There is no reason to believe differently in Avengers: Infinity War. Even if it wasn't deployed back to the orbital platform (as it is referenced as "Tony's old Hulkbuster Armor" in Spider-man: Homecoming when being loaded onto the cargo plane from Avengers Tower), it is obviously designed to be called upon over a long distance.
Remember that Bruce was not involved in the events of Captain America: Civil War, and as such Tony did not have any reason to lock him out of the system. Ostensibly, Bruce has the same authorization to call down Veronica as Tony does, and was able to do so from a computer in Wakanda (or maybe even a "Veronica, u up?" text to a special number from Cap's flip-phone).
Logically, this is likely a self-security measure - if Bruce, given enough advance warning, feels a "code green situation" coming on and Tony's not around, he could call in Veronica which may be programmed to attempt an A.I.-driven intervention if "the other guy" is there when she shows up. We have seen enough Iron Man tech running in autonomous mode to know this is possible. In this instance, though, Bruce simply ended up piloting the armor.