It's her habit to do homework before dinner.

Literal

She [topic-は] dinner [possessive-の] before [to-に] homework [object-を] do [nominalizer-の] [subject-が] habit has-become.

~のが習慣になっている — 習慣 (しゅうかん, 'habit') combined with になっている expresses an established pattern that has developed over time.