Many sections of web.config for SharePoint 2007 differ from those of a web application. Here's a quick overview of some of them.
CallStack
By default SharePoint will display a nice friendly error message :

But this will often be a vague message that isn’t really helpful in troubleshooting the real problem. To enable a detailed error message, find the following line in your web.config file :
<SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
Then change the CallStack="false" to CallStack="true". This should also be coupled with another change in the web.config file :
Custom Errors
The default will be to show custom errors, this will hide the yellow screen that is the ASP.NET error reporting page :

<customErrors mode="On" />
By changing mode="On" to mode="Off" the yellow screen will be enabled, which should provide a more detailed report of the error.
Safe Controls
SharePoint has measures in place that ensures that only trusted controls are used throughout the system. SharePoint will only load controls that have a SafeControl entry in the web.config file. Normally the SharePoint solution will write these entries in the web.config file, which is under administrative control (because an administrator is deploying it). But often a developer won’t worry about packaging up a control if they are still developing, so they need to manually add a control to the SafeControls section of the web.config file, a typical entry looks like :
<SafeControl Assembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Portal.WebControls" TypeName="*" />
Blob cache
A SharePoint administrator should be aware of this setting, because it can increase the performance of your site. The idea is that SharePoint will write any images, CSS or JS to a folder on disk rather than requesting the file from the content database. The following entry should be modified to enable the BLOB cache :
<BlobCache location="C:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="10" enabled="false" />
To enable the BLOB cache, change enabled="false" to enabled="true" and make sure that the location exists.
Trust level
Another important concept that new developers need to come to terms with is that by default SharePoint will run under a custom trust level called WSS_Minimal. This means that they can’t deploy assemblies into the bin directory, with the WSS_Minimal setting they would need to deploy to the GAC. Normally in a development environment where the developer is constantly changing and testing the code, they will want to change the following line :
<trust level="WSS_Minimal" originUrl="" />
To
<trust level="Full" originUrl="" />
Proxy Settings
Often in a corporate environment a proxy server will sit between your SharePoint farm and the internet. The web.config file can be used to store the proxy information, by default the section will look like :
<system.net>
<defaultProxy>
<proxy autoDetect="true" />
</defaultProxy>
</system.net>To add a new proxy :
<system.net>
<defaultProxy>
<proxy useSystemDefault="false" proxyaddress="http://CompanyProxy" bypassonlocal="false"/>
</defaultProxy>
</system.net>