Why is sand/glass polar? How does lattice structure change polarity?
I'm not sure where you get the idea that glass is linear. What makes a glass is the lack of long range ordering, though in fused silica, the approximate tetrahedral structure of $\ce{SiO4}$ is maintained (this is a 2D section, the fourth oxygens are not shown):

 Source

In normal glasses, there is no significant net dipole moment across the entire structure, but the reason we observe strong adhesive forces between water and glass is a surface phenomenon—in the bulk of the glass, every silicon atom is connected to four oxygen atoms and each oxygen atom to two silicon atoms, but what happens at a boundary/surface? There are oxygen atoms that only have one bond. When these are exposed to an aqueous solution, some will bear a negative charge, others will pick up a proton from water. The theory behind it is pretty complicated, but you can think of it as a simple acid-base reaction—at low pH more will be protonated:

$$\ce{Si-OH &lt;=&gt; Si-O- + H+}$$

In any case, protonated or not, silanol groups are very happy to associate with water, accounting for the concave meniscus.