If you have a smooth projective variety over a field and a Weil cohomology theory, weak Lefschetz gives you some cohomological information about its smooth hyperplane sections. Now, if I give you a smooth proper variety, can you give me any cohomological information about its smooth closed subvarieties of codimension 1?

The question is admittedly somewhat ambiguous. I just know that if you smart enough, you can sometimes bootstrap from "good" cases. For example, Deligne has proved that odd Betti numbers of smooth proper varieties over $\mathbb{C}$ are even this way. Another example is when you have a proper, non-smooth variety, you can find a smooth proper hypercovering and get mixed Hodge structure.

and$X \setminus D$. One way to think about the Lefschetz hyperplane section theorem is that there's a Gysin sequence involving the cohomology of $D$, $X$ and $X \setminus D$ and when $D$ is ample there are vanishing results for the cohomology of $X \setminus D$. $\endgroup$ – cgodfrey Apr 21 at 6:21