Formal:
* Como foi o trabalho? (This is the most literal translation and is suitable for formal settings.)
Informal:
* E aí, como foi o trabalho? (This is a more casual way to ask and can be used with friends and colleagues.)
* Como foi seu dia no trabalho? (This is a more polite and friendly way to ask.)
* Trabalho foi bom? (This is a very informal and direct way to ask.)
Other variations:
* Como está o trabalho? (This literally translates to "How is work?" and is used to ask about the general state of work.)
The best way to say "How was work" in Portuguese depends on the specific situation and your relationship with the person you are speaking to.