The 28-year-old, who won the 2007 Bundesliga title with Stuttgart, trained with Leverkusen on Friday.
"In Roberto Hilbert, we have gained an experienced, attack-minded right-back," said Bayer chief executive Wolfgang Holzhaeuser.
"He has international experience and makes us flexible tactically, especially on the right side."
Hilbert made the last of his eight appearances for Germany against Austria back in 2008, less than a year after making his international debut, but has not featured for German head coach Joachim Loew's since.
With Daniel Carvajal having been sold back to Real Madrid after a season at Leverkusen, Bayer have brought in Italy U-21 defender Guilo Donati and Hilbert to cover the right side.
Bayer have been busy in the transfer market since finishing third in the Bundesliga with seven new signings including South Korea striker Son Heung-Min signed from Hamburg, Australia wing Robbie Kruse from Fortuna Duesseldorf and Bosnia defender Emir Spahic from Sevilla.