。
She turned off the lights so as not to waste electricity.
Literal
She [topic-は] electricity [object-を] waste-not [so that-よう] light [object-を] turned-off.
~ないよう(に) ('so as not to / in order not to') is the negative-purpose form of ~ように. 浪費する ('to waste / squander') is a more formal word than 無駄にする. 明かりを消す ('to turn off the lights,' literally 'to extinguish the light') is the standard expression. A practical, everyday sentence showing purpose-driven action.