Both ‘tu’ and ‘você’ are second person singular pronouns; the difference is mainly a regional one. Whereas Portugal uses ‘tu,’ Brazil tends to use ‘você.’ However, there are certain regions of Brazil (such as some northern and southern states) where local dialects developed with ‘tu’ gaining precedence over ‘você.’
A very important distinction, however, is the verb form used by each. ‘Tu’ takes a verb in the second person singular, whereas ‘você’ takes a verb in the third person singular. For example:
Tu és muito ocupado.
You are very busy.
Você é meu melhor amigo.
You are my best friend.
Formality has no bearing in the matter: if you wanted to be formal, you would address someone as ‘senhor’ (mister/sir), or ‘senhorita’ (miss/lady) for young women and ‘senhora’ (mrs./madam) for older women. These formal pronouns also take third person singular verbs:
O senhor caminha pela praia todos os dias.
You walk on the beach every day.