Depends on your purpose. The only rule which immediately comes to mind is to spell in words any number which occurs at the beginning of a sentence. Check what is stated in a manual of writing.
The only rule that I think is particularly important is not to use two sequential numbers in the same form. "Sixteen 2-liters", not "16 2-liters" or (worse) "Sixteen two-liters".
The only rule that really matters is "follow your style guide".
Plenty of style guides are available. College bookstores, premium bookstores, high school English departments and their teachers (probably many but not all), some dictionaries. Other academic departments in institutions might also have a style guide.
Also, you might find a couple of interesting links to writing style in www.rbs0.com