How can I create a link, within a form, for a user to download a file?
Okay, so I found a solution that works pretty well, though I'm sure there are better ways to do this.

I resolved on the submit button approach, as it seems all buttons in Drupal 8 turn into submit buttons anyway. Here's the code for the button itself.

$form['taxonomy_download'] = [
      '#type' =&gt; 'submit',
      '#value' =&gt; t('Download Default Taxonomy Terms'),
      '#limit_validation_errors' =&gt; array(),  //don't run form validation when this button is pressed
      '#submit' =&gt; array('::downloadFile'),  //call this function when the button is pressed
];


Then, for the downloadFile function:

public function downloadFile(array &amp;$form, FormStateInterface $form_state) {

    // Creates a string of the file location. SERVER_NAME returns the
    // name of the host site, e.g. 'www.example.com' or '50.0.0.1'
    $buildUrl = 'http://' . $_SERVER['SERVER_NAME'] . '/sites/default/files/Example.xlsx';

    //drupal_set_message($buildUrl);    //uncomment this line to see what is getting passed

    $url = Url::fromUri($buildUrl);     //Creates a url from the file location

    $form_state-&gt;setRedirectUrl($url);  //Redirects the user to the file location
}


You will need to place the file that you're trying to download into the public files folder, found in your Drupal installation's sites/default/files/ folder. You can test that you have the file in the correct location by typing the full path (e.g. http://www.yoursite.com/drupal/sites/default/files/ExampleFile.ext) into your browser's address bar. The file should download when you go to that address.

Finally, you will need to include use Drupal\Core\Url; at the top of your code to make the fromUri() and setRedirectUrl() functions work.