You need to echo
your data. Try this instead –
function add_link_to_aff() {
$html_output = "<li><a href="#">" . __( 'Test', 'yith-woocommerce-affiliates' ) . "</a></li>";
echo $html_output;
}
add_action( 'yith_wcaf_after_dashboard_links', 'add_link_to_aff', 10 );