The default widgets are defined in wp-includes/default-widgets.php
.
To find specific code search the Codex or use queryposts.com. The best tool is your IDE (integrated development environment). All IDEs offer a full text search in a set of files.
Here a screen shot from Eclipse PDT
As you can see it is really flexible – and it’s fast too. See also this question for a basic guide on how to work with WordPress in an IDE.