I've noticed that when it comes to non-towered airports, some are in class G airspace and others have class E airspace starting from the surface. At first I thought the airports with class E at the surface might be in that configuration because they have precision approaches, but then I found exceptions where the airport has class G at the surface along with a precision approach. Is there a particular reason some non-towered airports are in class E while other are in class G?
This answer is specific to the United States (heck, I don't know if this is an even an issue elsewhere in the world).
The airspace classification actually has nothing to do with whether or not a particular airport has a precision approach. It is based on two factors: communications capability and weather observations.
For a non-towered airport to have Class E (surface) airspace, ATC must have communications capability with aircraft down to the runway surface. Second, weather observations must be provided by a Federally certificated observer and/or Federally commissioned weather observing system. Reference: FAA JO 7400.2K, paragraphs 18-1-1 and 18-1-2.
If one (or both) of these conditions are not satisfied, the surface airspace will be class G with a class E floor of 700 ft. AGL if there is an instrument approach into the airport and 1200 ft. AGL if not.
Now, here's a twist: if the airport has a part-time control tower, the airspace may become Class G when the tower is closed, even if both communication and weather reporting requirements are satisfied. Be sure to check the Chart Supplement (fka A/FD).