Evolutionary biology is largely about the pressures of an organism's environment, so the two forms of your question are one and the same. As such, there are many reasons why they may be formed that way:
Location, location, location
Merfolk have tails, and can only swim. Your vipers have legs that are better-adapted (but worse than tails) for swimming, and better-adapted than tails for walking. This implies that their natural habitat consists of both land and water - coastal shallows, inland lakes, etc. Without the power of a tail for speed, swimming deeper/further out in the ocean will put them at a disadvantage compared to a reef.
The need to be out of (or in) the water
There are many reasons why a water-dwelling creature might need to be out of the water. Perhaps their normal habitat has dry and wet seasons, like the lungfish, which requires them to breathe air to survive. A moderate metabolism and the inability to reduce it or hibernate would produce organisms that retain mobility and can seek resources during the dry months.
Another reason to escape from water to land (or land to water) is natural predators occurring in either (or both). A viper may be able to outrun its water-dwelling predators or outswim its land-bound ones.
Dietary and other health restrictions inherited from human ancestors may make it untenable to live entirely underwater. Vitamin D from the sun, along with other vitamins and minerals found in land plants and animals, may not be available in a deep-water environment.
Freshwater vs saltwater dwellers
I've already addressed location, but this is kind of tangential. The ocean is, of course, salt water. It takes a specific biochemistry to handle the salinity of the ocean, which your vipers may not possess (but the merfolk do). Fresh water is pretty much only found in close proximity to land, in lakes and rivers and basins. Even if they can survive in the brackish waters where fresh meets salt, the ability to survive on land is beneficial in areas where the climate includes dry or freezing periods. As such, they may have evolved to survive in the more transient nature of coastal and tidal regions, as opposed to the relatively constant deep-ocean saltwater environments.