Formal:
* Qual é a sua cor favorita? (Literally: "What is your favorite color?")
Informal:
* Qual é a tua cor favorita? (Literally: "What is your favorite color?")
The difference lies in the pronoun used for "you":
* Sua is the formal pronoun for "your"
* Tua is the informal pronoun for "your"
So, use the formal version when speaking to someone you don't know well or someone older than you. Use the informal version with friends and family.