Formal:
* Adeus, meu querido amigo. (Goodbye, my dear friend.)
* Até breve, meu amigo. (See you soon, my friend.)
Informal:
* Tchau, meu bem! (Bye, my love!) This is very affectionate and casual.
* Até mais, meu amigo. (See you later, my friend.)
* Valeu, amigo! (Thanks, friend!) This implies you enjoyed spending time with them.
* Te amo, meu amigo! (I love you, my friend!) This is very close and affectionate.
You can also choose a phrase based on the context:
* Que bom te ver! Até a próxima! (It was great to see you! See you next time!)
* Foi um prazer te conhecer! (It was a pleasure to meet you!)
* Que a vida nos encontre novamente! (May life bring us together again!)
The best phrase to use will depend on your specific relationship with your friend and the situation.