The pit helps them to locate prey. Of course, if you see a snake with rattles, you know it's venomous. This simplifies matters in the West, where rattlesnakes are the only pit vipers. But in the eastern half of the country, rattleless cottonmouths and copperheads both bear markings akin to many harmless species. Water snakes in particular are easily mistaken for pit vipers.
Body language is a good clue.
Cottonmouths are poor climbers and are likely to form a tight circular coil on a stump or log just above water level. Water snakes usually hang draped over a branch in a tree or bush. Also look at patterns. On a water snake, they're the opposite. The temperamental cottonmouth lives only in the South, in or near water.