Sight

A sight is a means by which the operator of a ranged hand weapon can more easily and accurately acquire a target for the weapon.

A sight can be as simple as physical protrubances on top of the weapon which are aligned to acquire the target. An example would be those on the Thompson submachine guns used by the Iotians in the 2260s. Other sights can be far more complex, such as the exographic targeting sensor Chu'lak mounted on a TR-116 rifle in 2375. 

Several types of Federation phasers also utilized sights, including the Type 1 phaser and Type 2 phaser of the 2260s, the model of phaser rifle used in the 2260s, and those used in the 2370s. The exact capabilities of each are not known, but the 24th century phaser rifles are said to have "multiple target acquisition" capability, and "gyrostabilization" built in. 

Background information
The sight on the Type 1/Type 2 is not immediately apparent in most episodes, but a detailed physical examination of one of the surviving "hero" phasers has documented its presence. (TOS Season 3 Disc 7 "A Star Trek Collector's Dream Come True"; Star Trek: Communicator magazine)

The sight on the 2260s phaser rifle is likewise not easily recognized, but is on the rear of the "tower" above the rifle hand grip. The one on the first rifle used in TNG-onwards is a flip up type most easily seen in (one of the ground forces has a nervous habit of playing with it).

Extensive use of computerized sights and compensators would also explain how characters could hit targets with their weapons not even properly aligned with them, as happened in many episodes of the newer shows.