What is the earliest record or source for making an Aufruf in some communities on the Shabbos before a wedding?
The Maharil in Hilchos Tisha Bav mentions that he celebrated
Shabbos Shpinholz שבת שפינהאלץ
on the Shabbos before his son's wedding (though it was Shabbos Chazon). It is also brought in Beer Hetev 551. It is not clear exactly what Shpinholz means, but it is some celebration on the Shabbos before the Chasunah.
Rabbi Aryeh Kaplan z”l in his book “Made in Heaven” gives a number of references. The earliest seems to be the LEVUSH - 1530 -1612 (282  in Hagah)
Rabbi Kaplan says the idea comes from the way King Solomon built the Temple with special gates - one for mourners and one for bridegrooms so the mourners would be consoled and the bridegrooms blessed. After the destruction of the Temple it became the custom for the bridegroom to come to the synagogue do that people could bless him.
see also Aufruf and Shabbat Chatan?