This information is from scientists at Sashco, a company that makes products for log homes, and for that reason they have staff who know a lot about wood. Behind their office building in Denver they have various projects continuously left exposed to sunlight and weather for years to see how it's affected.
Lignin and Cellulose
Lignin is the glue that binds the cellulose wood cells together to create wood.Cellulose is pretty durable to the elements. Lignin is not. Typically, lignin is oxidized by UV light, shifting to a darker orange color. We see this as freshly sanded wood “sunburns” to a darker and darker yellow color. Eventually, the lignin is so weakened at the surface that it washes away, leaving the wood cells at the surface; this leaves the surface looking silvery gray to the eye.
Water and Wood
Water alone is not detrimental to lignin, specifically. Trees grow with water inside them. Saturated wood can last for centuries. Look up Swamp Loggers for examples. The “Old Man” in Crater Lake is a vertically floating log, about 450 years old, that was already very old when it was discovered in 1896. It very slowly erodes from the top a few millimeters per year.
In humid environments or microclimates, the moisture content of wood can get into the decay range (roughly 25-50%), where fungi thrive. This is the danger zone. Some fungi eat the lignin, commonly known as white rot, which WOULD “delignify” the wood. Other fungi eat the cellulose, commonly known as brown rot.
Courtesy of SASHCO
Both are bad for log structures! These fungi are the ones that break down trees that fall in the forest. Laying on the ground, the wood gets plenty of moisture and rot sets in fairly quickly.
Salt water, specifically, is not horrible… Lots of wood floats around in the ocean until other organisms eat the wood. Sunken ships etc. last for centuries under water; the thing that is detrimental is the other organisms that live in the water, fresh or salt, that deteriorate the wood.
Consider an untreated wooden dock post, sunk into the water. We expect marine organisms to damage the wood below the water over time, but that takes a fair number of years, typically. A bit above the water, where the moisture content is in the ideal range for fungi, rot will set in and dismantle the wood from the inside out in 1-3 years. Somewhere above that, if the wood stays dry enough, it will be generally sound, though gray from the UV degradation at the surface.