Part of Mainframe's job is hacking into enemy computer systems and gaining access to areas that require punching a keypad. The gloves, while close-fitting enough not to inhibit typing and other finger work, help conceal his identity and may even be able to satisfy print-sensitive security through simulation or override signals. Notice that the new character Sgt. Hacker also wears gloves.
Firefly has probably has had his fingerprints removed (surgically or by cruder means), and may prefer "getting his hands dirty" to be closer to his work. Some of the sabotage jobs Firefly performs may require more delicate work than Mainframe's typing. It may also be that he wears gloves on some missions and not on others, depending on what his task requires. All of Firefly's figures wear gloves except the 2000 version; the cartoon character did not wear gloves.