The 18-year-old makes the switch for an undisclosed fee and will join Hoffenheim as soon as the transfer window officially opens on January 1.
He leaves Basel, with whom he won the Swiss title in his first season as a professional last May and for whom he was eligible to play in the Champions League this season, to join the Bundesliga side, who are just four points adrift of the top six at the midway stage of the season.
"We are delighted that we have been able to sign a German-speaking top prospect on a long-term deal," said Hoffenheim's general manager Ernst Tanner on his club's website.
"In spite of his young age, Sandro has already proven, particularly with the Liechtenstein senior national team, what he is capable of.
"He will find the ideal surroundings with us to take the next step."