The observer skill represents the ability of a dwarf to spot a stealth unit. The higher the skill the bigger the distance. The skill is particularly good to have for guards at your entrance or marksdwarves on your walls.
Testing reveals that even a highly skilled observer can only detect stealthed units up to 3 tiles away. That is, the detection area is a 7x7x7 cube centered on the observer, also requiring line-of-sight. An unskilled ambusher in stealth can walk near a grand master observer without being detected, as long as a distance of at least 4 tiles is maintained.
In adventure mode, the skill may also influence the probability of receiving the message "You feel uneasy" instead of an ambush. It slowly increases during combat and by successfully spotting ambushes and traps.