Try this instead :
#!/bin/sh
SONAR=~/"SonarQube/bin/linux-x86-64/sonar.sh"
echo "Waiting to start..."
$SONAR"$SONAR" start
Tilde expansion is disabled by quoting (like globbing), so you need to put the tilde outside the quotes.
The last line should not be inside $(), as doing this first executes the command, and then expands the content and tries to execute a commande expressed by such content.