Cannons are very short range. The fighter would have to approach the balloon at a high closure rate, creating some risk of a mid-air collision.
With a missile, the pilot can shoot from several miles out and never has to fly directly at the target. So, it's much safer.