From the SRD
Table: Attack Roll Modifiers
Circumstance Melee Ranged
------------ ----- ------
Attacker flanking defender* +2
Attacker on higher ground +1 +0
Attacker prone -4 **
Attacker invisible +2*** +2***
Defender sitting or kneeling +2 -2
Defender prone +4 -4
Defender stunned, cowering,
or off balance +2*** +2***
Defender climbing
(cannot use shield) +2*** +2***
Defender surprised or
flat-footed +0*** +0***
Defender running +0*** -2***
Defender grappling
(attacker not) +0*** +0****
Defender pinned +4*** -4***
Defender has cover —–— See Cover —–—
Defender concealed or
invisible — See Concealment —
Defender helpless See Helpless Defenders
*A character flanks a defender when the character has an ally on the opposite side of the defender and that ally threatens the defender
**Most ranged weapons can't be used while the attacker is prone, but a character can use a crossbow while prone.
***The defender loses any Dexterity bonus to AC.
****Roll randomly to see which grappling character is struck when an attack is made against two or more grappling characters. The character attacked also loses any Dexterity bonus to AC.