hi!
there is a little difference between these two phrases.
if you want to be precise
I will sing a song for you means that you will for someone as the song is dedicated to him/her
i will sing a song to you means that you wil simply sing in presence of that preson but the song isn't espacially for him/her
hope it helps :)