From Gineipaedia, the Legend of Galactic Heroes wiki
Warships utilize a number of very powerful neutron beam or electron beam cannons that can fire across exceptionally large distances and still maintain a high level of accuracy. These cannons are typically recessed into the hull of the ship, with a movable focusing lens near the end of the barrel that allows the beam to be fired at different angles. (A typical neutron beam cannon can be fired, for example, at a 30 degree angle).
Due to powerful electromagnetic-interference (as a result of both ECM and natural stellar phenomena) that make it very hard to "lock on" to an enemy ship with computer targeting, cannons and other weapons systems are typically operated manually. Because of this, most warships are equipped with a large number of cannons, firing all of them simultaneously in the general direction of an enemy ship, hoping to score a hit.
Electron Beam Cannons
The acceleration of protons and electrons using electromagnetic fields has been known since ancient times. Due to the small mass of electrons, they have to be accelerated to a significant percentage of the speed of light in order to be effective as weapons.
The beams were vulnerable to adverse interference by strong magnetic fields such as those of nearby stars. Also since electrons were all negatively charged, they would repel each other, and decrease beam coherence.
Electron beam cannons were the main form of defence against small craft on Alliance ships of cruiser size and larger. (Data Book: Mechanic & Seiyū Encyclopaedia, p. 179)
Neutron Beam Cannons
In the past, electron beam cannons were the main form of ship weaponry due to the inability to accelerate electrically neutral neutrons directly using electromagnetic fields. Technological advances in the ability to manipulate gravitational fields allowed for the creation of directional gravity fields that could directly accelerate neutrons, finally making neutron beam cannons feasible.
The greater mass of the neutron compared to the electron translated to greater firepower. In practice, a neutron beam cannon had 3 to 4 times the power of an equivalently sized electron beam cannon and had greater target penetration capabilities. Once introduced, neutron beam cannons became the primary armament of Alliance battleships. (Data Book: Mechanic & Seiyū Encyclopaedia, p. 180)
As the standard Alliance battleship of 740 UC (431 IC / 3540 CE) was still using electron beam cannons as primary weapons, this implies that all older ship designs also had electron beam cannons as their primary armament. (Data Book: Mechanic & Seiyū Encyclopaedia, p. 137)
The longest-ranged neutron cannons in the Empire were capable of reaching up to 50 light-seconds as estimated by Alliance analysts, while the longest-ranged Alliance guns were capable of reaching up to 40 light-seconds, although both designs were fielded only on an experimental basis. (Data Book: Mechanic & Seiyū Encyclopaedia)