If you keep staying up late, it'll ruin your health, you know.

Literal

Night-late do-is-ing-[cond-と] health [obj-を] harm-[assertion-よ].

健康を損なう ('harm/damage one's health') is a set collocation — 損なう is the transitive 'to harm, to mar.' ~ていると (a compound of ~ている + と) gives 'if you keep (habitually) doing X, then...' The warning よ closes it.