We can very easily access connection strings (defined in Web.config) inside other class library projects included in the same solution as the web project simply using the System.Configuration namespace.
Here is the code for ASP.NET 2.0:
System.Configuration.ConfigurationManager
.ConnectionStrings["ConnectionString"].ToString();
Note: Don't forget to include a reference to System.Configuration dll in your class library project using Add Reference in VS.
In ASP.NET 1.x:
System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
Check out this extremely useful website for connection strings:
http://www.connectionstrings.com
Hope this helps!