Stokes law for the force of friction experienced by a sphere in a slowly moving fluid
$$
F_d= 6\pi \eta a u,
$$
where $u$ is the fluid velocity, $\eta$ is the viscosity and $a$ is the radius, is a rigorous consequence of the Navier-Stokes equation in the limit of small Reynolds number $R=ua/\nu$ where $\nu=\eta/\rho$ ($\rho$ is the mass density of the fluid).
Indeed, the Navier-Stokes equation also predicts higher order terms in $R$. The next term (due to Oseen) provides as correction
$$
1+ \frac{3}{8}R,
$$
which gives a quadratic dependence on $u$. Higher order terms are more complicated (terms like $R^2\log(R)$), and eventually turbulence implies that the expansion ceases to be useful, and the drag has to be computed numerically.
The Navier-Stokes equation itself can be derived using more microscopic theories, like (quantum) kinetic theory. In particular, for dilute gases the Boltzmann equation determines the viscosity $\eta$ in terms of the scattering cross section between atoms. A simple estimate is
$$
\eta =\frac{\sqrt{2mT}}{3\sigma}\, ,
$$
where $T$ is the temperature, $m$ is the mass of the atoms, and $\sigma$ is the cross section. This formula is roughly correct for air, but liquids (like water) are more complicated, and $\eta$ has to be computed numerically. This is explained in standard text books on kinetic theory, like vol X of Landau and Lifshitz (or more introductory text books on stat mech, like Kerson Huang's book).
The scattering cross section between atoms can be computed using the laws of quantum mechanics. For neutral atoms the long range potential is the van der Waals (Casimir-Polder) potential, which arises from two-photon exchange and is governed by the polarizability of the atoms.
Note that in passing from many body quantum mechanics to a macroscopic theory like kinetic theory or fluid dynamics we have to coarse grain, and as a result we go from time reversible microscopic dynamics to irreversible macroscopic dynamics. However, the important point is that the parameters of the macroscopic theory (shear viscosity, in particular) are completely fixed by microscopic dynamics.
Solid-on-solid friction is a slightly different subject, see Can the coefficient of friction be derived from fundamentals? .