He played a special music to/for me.

He sang a song to/for me.
He brought a rice cake to/for me.

(Do we have to use 'to' or 'for' here? Are both prepositions correct?)

He played special music for me.

He sang a song to me.
He brought a rice cake for me.

It's not easy to explain which one to use under what circumstances!!

Both prepositions are correct in those sentences.

They have a slight difference of meanings in those sentences, but the difference is so slight as to be meaningless.

I agree with Writeacher for number 1. We would not usually use "to" in that sentence.

In the given sentences, both "to" and "for" can be used, but they slightly change the meaning of the phrases.

Using "to" implies that the music, song, or rice cake was directed towards you, as the recipient. It suggests that the person played the music, sang the song, or brought the rice cake specifically for you.

Using "for" implies that the music, song, or rice cake was intended as a gift or gesture of kindness towards you. It suggests that the person played the music, sang the song, or brought the rice cake for your benefit or enjoyment.

Here are the revised sentences according to the two different interpretations:

1. He played special music to me. (He directed the music specifically towards you.)
He played special music for me. (He played the music as a gift or gesture of kindness towards you.)

2. He sang a song to me. (He directed the song specifically towards you.)
He sang a song for me. (He sang the song as a gift or gesture of kindness towards you.)

3. He brought a rice cake to me. (He directed the rice cake specifically towards you.)
He brought a rice cake for me. (He brought the rice cake as a gift or gesture of kindness towards you.)

Ultimately, the choice between "to" or "for" depends on the intended meaning or emphasis you want to convey in your message.