Formal:
* Il était une fois... (This is the most common and literal translation)
Informal:
* Il était un temps... (This is slightly less formal)
* Autrefois... (This means "formerly" or "in former times")
For storybooks:
* C'était une fois... (This is similar to "Once upon a time" but often used in storybooks)
You can choose the translation that best suits your needs.