Well accuracy for ranged units does have quite a few variables.
Line of sight -we've already mentioned- will affect not only fog of war, but also accuracy of ranged units.
Light/Darkness as mentioned in spells will have an effect on accuracy, not only spell-created by regular in general. Weather will also effect this.
Units will have a paticular set accuracy depending on the unit, dumb little goblins are going to have lower accuracy than most. Experience will give the unit a higher accuracy, as well as certain tech upgrades.
Range will have an effect, however I don't believe we've decided on if it's going to be a standard "closer is better" system, or a too far/too close system like the Hunter class in World of Warcraft. Where you'll get a better accuracy if your target is neither too far nor too close to the archer.