It's the other way around: sugarcane was introduced to the Americas from Europe. In fact, there were important sugarcane plantations in the South of Spain, like the Kingdom of Granada, and in the East of Spain, most notably around Valencia.
Sugar was used for pastries (called in Spain "frutas de sartén" or "pan fruits"), cakes, and for confitures and jams. Jams and confitures are a very good way of preserving fruits, and some regions were renowned for the quality of their preserves like Valencia. The preserves of Valencia are even mentioned as something valuable in the Lazarillo de Tormes, written ca. 1548-1550.
As for recipes, you can check cookbooks like the Llibre de Sent Soví, from the 14th century, and you'll find uses for sugar.
Just to add a bit to the previous answers, Europeans were probably introduced to sugar cane from Asia during the crusades. It may have already been grown in Muslim areas of Spain and Sicily, but it was definitely known more widely from the crusader states. One medieval historian wrote that sugarcane was:
"a most precious product, very necessary for the use and health of mankind, which is carried from here by merchants to the most remote countries of the world."
I guess it's a bit tangential to this question, but I wrote about sugar and other foods introduced to Europe during the crusades: Did the Crusaders Bring Back New Foods or Cooking Methods to Europe?
I cannot properly answer the question what sugar was used for before tea and coffee became popular. But, i hope it's alright for me to point out that the Columbian Exchange brought sugarcane from Eurasia to the Americas, not the other way around. The Caribbean did become a huge source of sugar, so it's an easy mistake to make.