The first thing you should do is to check the fuse for the rear window. If the fuse is blown, it will need to be replaced. Refer to your owner's manual to locate the correct fuse.
Next inspect the wiring leading to the rear window. Look for any visible damage or loose connections. If you find any issues, consider having them repaired or replaced.