To use the UAV's machine gun, you first need the Vehicle Alternate Fire package equipped in your loadout.
Once that's set, firing is done with the secondary fire button—which varies depending on the system you're playing on.