You don't have to get a gun. This game is playable all sword, all gun, or all bomb.
Gun damage type is usually determined by whether you wish to use it as a sidearm, or as main dps. Sword usually take the role of dps, so guns are left as a secondary to deal with long ranged turrets. In such a scenario, an elemental gun will serve you well. There are 3 kinds of turret, polyp, puppy, and howlitzer. Puppies and howls are weak to elemental, and polyps are neutral. One can see the benefits of being able to take most turrets easily.
Guns for this scenario: Polaris at 5*, it upgrades from the 2* pulsar, a boss token reward from roarmulous twins. It applies shock at times, and the expanded bullet mechanic of the pulsar line interrupts turrets, keeping you safe.
For guns to use as main dps, you need to consider the 3 damage types to be covered. For elemental, you have the choice of alchemers, 3 status dealing and one pure damage. The polaris mentioned above is not a good elemental weapon due to the fact that expanded bullets knock the target back, reducing dps from following shots. It also annoys the heck out of ur teammates with the blinding light and knockback.
Alchemers are 2 shot per clip guns. The bullets, when hitting a target, will split randomly to the left of your knight. This ricochet allows you to potentially deal twice the damage, starting from mk2, where the ricochet effect is gained.
Nova for pure damage, magma for fire, storm for shock, hail for freeze. Prisma, firo, volt, and cryo, at lower stars. Note the status alchemers have a lower base damage than the nova.
For shadow handguns, you have 2 choices. A shadow alchemer dealing equivalent damage as the nova, with no status infliction. Biohazard, a gun from the catalyzer line. Slow shots, charged shot does no damage, but instead applies a charge to the target, which explodes when a normal shot comes in contact with it.
Piercing guns are rather hard to use, all suffering from some sort of loss in mobility. Callahan is 2 shot, rooted to the spot as you fire. Blitz needle is multiple shots per attack, but roots you to the spot until all shots are fired.