How to know which module is responsible for each database query?
For any modules you download from drupal.org, you can click on the function link within the where column and it will direct you to api.drupal.org and you can see the module there.

I couldn't find any settings that would enable showing where the call originated (file path) if the module wasn't an 'official' contrib.  A little digging and you can find the information within the devel.module.  Specifically, devel_query_table() receives $queries as its first argument.  $queries contains the rows that will be displayed and it does have the file path.

I created a quick patch to test this (Doing this does not imply that i think you should modify contrib modules in a production environment):

diff --git a/sites/all/modules/devel/devel.module b/sites/all/modules/devel/devel.module
index 0ebdef4..dd6aaa8 100644
--- a/sites/all/modules/devel/devel.module
+++ b/sites/all/modules/devel/devel.module
@@ -1482,7 +1482,7 @@ function _devel_print_object($obj, $prefix = NULL, $parents = NULL, $object = FA
*/
 function devel_query_table($queries, $counts) {
   $version = devel_get_core_version(VERSION);
 -  $header = array ('ms', '#', 'where', 'ops', 'query', 'target');
 +  $header = array ('ms', '#', 'what', 'ops', 'query', 'target', 'where');
    $i = 0;
   $api = variable_get('devel_api_url', 'api.drupal.org');
   foreach ($queries as $query) {
 @@ -1514,7 +1514,8 @@ function devel_query_table($queries, $counts) {
   'id' =&gt; "devel-query-$i",
   'data' =&gt; $placeholders . $args . $explain,
 );
 -    $cell[$i][] = $query['target'];
 +    $cell[$i][] = $query['target'];    
 +    $cell[$i][] = '&lt;div style="overflow-x:scroll"&gt;' . check_plain($query['caller']['file']) . '&lt;/div&gt;';
      $i++;
     unset($diff, $count, $ops);
 }


Here is the raw output on pastebin: http://pastebin.com/Ww5CkQsL

And a screenshot of the un-styled results:



This is a little rough looking as there are style sheets involved, but it gets the information.

Even better would be if the where column builder checked for the availability of the function on d.o but I'll digress, as I feel we may be entering, 'file an issue (feature request)' territory.