Weapons are an attachment on board a UFO that are used to harm ships, beings, and placed/native cities or tribes. They are not attached in the Spaceship Editor, and are bought and sometimes used for conquering planets, destroying ships, Killing the infected, and many other uses for that matter. The Weapons category of attachments includes actual weapons such as lasers and missiles, but also includes protective devices such as shields.
These Weapons have different abilities for each one you buy, but as you level up, there will be more advanced and expensive devices occurring for your empire's needs, leading up to a larger, more known and advanced empire. Though all empires sometimes don't have the arms you want, because of the sentient knowledge prior to what they live on, for example, if you wanted to wage war with terraforming items, the best choice to buy the items from is an Ecologist, due to the vast expertise of nature.