How do write good luck in Latin?

To say something about good luck--"He has good luck", or some such--you can use "fortuna secunda". To wish someone good luck, you might say "Bene rem gere!" or simply "Feliciter!".

Although the literal translation would be something like bona fortuna, in fact, the Romans used to say "Res secundae" which sounds a bit like "second things" but actually means "favourable things."

The accusative of exclamation could be used: "Bonam fortunam".