The simplest non-free topological groups are the surface groups. Gilbert Baumslag first proved that a surface group is residually finite by viewing it as a free product of two free groups with maximal cyclic amalgamation [GBaum62]. A much simpler proof was given in a short paper by John Hempel [Hemp72]. This proof is worth quoting in its entirety, both because of its short length, and because it demonstrates the covering space methods which can be put to good use in this field.
Theorem: Let F be a (possibly bounded) 2-manifold, then pi1(F) is residually finite.
proof: We may assume that F is compact and orientable (If F is not orientable, the fundamental group of its orientation cover is a subgroup of index 2, so proving one is rf is equivalent to proving that the other is rf).
Given a in pi1(F) (a not equal to 1) we must find a normal subgroup of finite index in pi1(F) which does not contain a. Since the intersection of all subgroups (of any finitely generated group) of a fixed finite index is normal (in fact characteristic) [MHall50, pp128] and also of finite index, it suffices to show that for a general position map of pointed spaces f:(S1,*)->(F,*) representing a there is a finite sheeted covering p:F~->F such that f does not lift to a map f~:(S1,*)->(P,*). We induct on the singular set, S(f), of f. If f is an embedding, then f represents either a "standard generator" or a product of commutators of "standard generators" for pi1(F) depending on whether the induced map on the first homology group, f*:H1(S1)->H1(F), is nontrivial or trivial. In either case we can easily construct p:F~->F to be a double covering in the first case and a six sheeted covering corresponding to the kernel of an appropriate homomorphism onto the symmetric group on three letters, pi1(F)->S3, in the second case. If S(f) is not empty, let U be a regular neighborhood of f(S1) in F. There is a simple loop g:(S1,*)->(U,*) which represents a nontrivial element of pi1(F). By the preceding case there is a finite sheeted covering q:F^->F such that g does not lift to a map g^:(S1,*)->(F^,*). If f does not lift to F^ we are through. If f does lift to f^:(S1,*)->(F^,*), then S(f^)<S(f). If S(f^)=S(f), then q|f^(S1) would be an embedding, and q would map a neighborhood of f^(S1) homeomorphically onto U. But then g would lift to F^. Hence S(f^) is a proper subset of S(f), and the proof follows by induction on the order of S(f).
A more difficult task was accomplished by Edna Grossman [Gros73] in showing that the mapping class group of the orientable surfaces, or the group of orientation preserving homeomorphisms modulo those which are isotopic to the identity, is also residually finite. The proof was done by noting that in the case of the surface groups the mapping class group is the subgroup of orientation preserving automorphisms in the group Out(pi1(F)). In turn, proving that Out(pi1(F)) is residually finite requires first proving both that it is conjugacy separable, and that any conjugacy class preserving automorphism of pi1(F) is an element of Inn(pi1(F)).
For several years prior to a proof being known knot groups had been conjectured to be residually finite [Neuw65, Hemp76]. The case of fibered knots (sometimes called Neuwirth knots) can easily be handled first:
Def: A knot is said to be fibered if its complement is a bundle over a singly punctured surface with fiber a circle.
Thus the fundamental group of a fibered knot is an extension of a finitely generated free group (the fundamental group of a punctured surface) by an infinite cyclic group. Using any form of the theorem that a cyclic extension of a finitely generated, residually finite group group is residually finite [Mal58, Hemp76, cor. 15.21, Neuw65, Mill71, Thm III.7], and recalling that a free group is residually finite, we get that fibered knots have residually finite groups.
For non-fibered knots the situation is much more complex. The commutator subgroup of a non-fibered knot is an infinite graph product, where the underlying graph is linear. The edge groups are the fundamental group of a minimal genus Seifert surface S (hence the free group of order twice the genus of the surface), and the vertex groups are the fundamental group of S3\S. The injections are induced by the geometric inclusions S->S3\S. One might hope that one could always construct the Seifert surface so that pi1(S3\S) is a free group, but an example by Herbert Lyon [Lyon72] shows that not every knot has an incompressible, free Seifert surface.
The first results which showed that a class of non-fibered knots had residually finite group was that of Peter Stebe [Steb68]. Stebe used a stronger condition than residually finite, that of pic, which the knots satisfied. He then proceeded to show inductively that a class of links which included the torus knots, the hose knots, and certain links constructed from torus knots were pic.
In the 1970's E. J. Mayland first proved that twist knots (ie twisted Whitehead doubles of the unknot) and generalized twist knots (where one is allowed to twist the doubling clasp) have residually finite groups [Mayl72]. He used earlier work by G. Baumslag on parafree groups to show that their commutator subgroups were residually-p for any prime p. In a later argument, using Schubert's normal form for the group of a two-bridge knot, he constructed a one-relator presentation for the group and showed that it was residually finite [Mayl74]. Finally, using special techniques to handle six exceptional knots, he was able to show that all of the knots in Reidemeister's knot table (the knots of up to 9 crossings, which he referred to as the "classical knots") had residually finite groups [Mayl75]. In a later joint paper with Kunio Murasugi these methods were used to show that any alternating knot, the leading term of whose Alexander polynomial is a prime power, has a residually finite group.
To these results may be added the further observation that if two knots, K1, K2, have residually finite groups, then the composite knot K1#K2 will also have a residually finite group. This may be drawn either as a consequence of work by Hempel [Hemp87] or directly from a paper of Boler and Evans [BE73].
The question of whether or not knot groups are residually finite was finally answered in the affirmative as a consequence of Thurston's geometrization theorem. A rough outline of the proof follows: Work by Jaco, Shalen, and Johannson [JS79, Joha79] allows one to decompose the knot complement along incompressible torii. (For a composite knot the first step in the decomposition would divide it into the complements of its prime components.) Thurston's work [Thur82] then allows one to put a hyperbolic structure on those components which are not Seifert fibered spaces. The fundamental group of a Seifert fibered space is residually finite [Hemp76, pp 177] and those components which have hyperbolic structures have fundamental groups which are subgroups of the modular group of matrices, and hence are residually finite [Mal40]. The final step was provided by Hempel [Hemp87] when he proved that a graph product of fundamental groups of Seifert fibered spaces and fundamental groups of spaces with hyperbolic structures, having peripheral copies of Z+Z (the fundamental groups of the splitting torii) as edge groups, is residually finite.