Slightly more formal and warmer than 同学 (tóngxué, 'classmate'). 学友 emphasizes the friendship side of having studied together; common in alumni newsletters, reunion speeches, and on diplomas/certificates.
culture
Cantopop megastar 张学友 Jacky Cheung (Zhāng Xuéyǒu) carries this exact word in his given name — handy mnemonic: 'Mr. Schoolmate.'