The best and only real way to know if a snake is harmful, is to know your snakes. Many will tell you that you can tell by the shape of the head, but this is a myth because cobras, mambas, coral snakes, and many others do not have that triangular-shaped head that is the trademark of venomous snakes like the viper (and others). Also, just as some humans are shaped differently from others or can develop improperly, so can snakes. And if you live outside of the US, there may be many snakes in your area that do NOT have a triangular shaped head.
Another common myth is that you can tell by the vertically slit pupils. However, cats and alligators also have vertically slit pupils, and we all know they are not venomous.
Also, many species of snakes look one way as juveniles, and quite a different way after they mature. Yet, the venom of snakes (who have it) is just as toxic at birth or hatching as it is when they are adults. Their appearance can also differ depending on how well the lighting is where they are, or whether they are in the shadows. Lastly, their appearance can differ by the area they are found in. There is a type of Copperhead in Texas, for instance, that looks quite different from the ones you typically find in North Carolina.
If you aren't familiar with a species of snake and able to readily identify it, the best thing to do is avoid it altogether and make lots of ground noise (vibration) when walking through habitats where snakes can be found so they know you are coming and have a chance to hide or slither away. O'Shay (one of the experts you often see on television dealing with snakes) once made the mistake of misidentifying a snake and grabbed it... Or grabbed it before he identified it. Well, it turned out to be a Stiletto, which is a venomous snake with fangs that protrude out of the sides of the mouth (not too differently from the way a wart hog's tusks protrude without him having to open his mouth). Anyway, long story short, the snake whacked him with the side of his face and one of his fangs sunk in O'Shay's hand and he was venomated. So, you see, even the experts can make mistakes. Snake identification can really be tricky.
Species of posonous snakes are generally identified by a broad triangular head shape and the presence of fangs,a limited amount of snakes do not have an apparent "viper" shaped head such as the coral snake,whose venom is given in a more gripping and chewing manner. Some snakes such as the bull snake put on bluffs to make other predators believe they are dangerous,the best resort is to determine which snakes are poisonous in your region and learn of any warning behaviors they have (rattlesnake rattle). If you live in an area that may contain snakes that rely on camoflage and stealth to hunt it would be advisable to wear snake chaps in areas of heavy cover. But in general the robust and heavy head shape is a very good indicator that the snake you are dealing with is dangerous.
Most poisonous snakes have a larger head than their bodies, lots of nonpoisonous snakes look like a real poisonous snake so when in doubt just avoid them
The skin colored snakes are usually toxic.
Usually, a poisonous snake's are longer than the usual non-poisonous snake's fang's.
I heard of a saying "Red touches black, You're ok Jack. red touches yellow, you're a dead fellow." Dealing with the markings on the snake.