the_sub_field() function may produce output (the link), or not.
The first thing to do is capture that output using an output buffer in order to check it's contents:
<?php
ob_start();
the_sub_field( 'funding_link' );
$link = ob_get_clean();
Next just check the content of $link: if not an empty string then output the button's HTML code
if( $link != "" )
{
echo "<div class=\"button\"><a href=\"$link\">Donate</a></div>";
}
Finally close the PHP code block
?>
If you're using advanced custom fields then
the_sub_field(...)
is equivalent to
echo get_sub_field(...)
In this case the solution is simplier as you can just get the link into a variable without using a buffer:
<?php
$link = get_sub_field( 'funding_link' );
if( $link != "" )
{
echo "<div class=\"button\"><a href=\"$link\">Donate</a></div>";
}
?>