How to know when to bleed a hydraulic disk brake / tips for improving disk brake performance? I've had a new bike for a week or two. I bought it online and I'm paying the price of not being able to chat to the store about the brakes.

It is a cyclocross bike with SRAM Rival hydraulic disk brakes.

The front brake seems to be fine, although it is definitely a little bent already, which I will attend to. When the level is applied, the stopping power seems to be quite strong. It bites quickly and is powerful.

However, the rear brake is very ineffective. The reach is the same as the front brake, it is reasonable and if the brake was powerful, I think it would be fine. However, once I reach the point of contact it is very spongy and ineffective. 

Is there an obvious way to tell whether it might need bleeding? It strikes me as unlikely, due to the fact is almost brand new.

Are there other things I can try to improve the performance?

I've read about adjusting how close the brake pads are to the disk, I will probably try bringing them close to see if that helps.

Is there a sure fire way to bed in the brake-pads? I'm not convinced they are bedded-in yet.

What's the best way of cleaning the rotors and pads to ensure I haven't managed to get an WD-40 or anything on them?

Any other tips?
Bad disc brake performance is almost always either air in the lines or oil on the pads.

Air makes the levers spongey and oil stops the pads grabbing the disc.

Your problem sounds like air, a bleed should sort it out. A bad bleed from the factory is not that uncommon.

If you've patience you can try turning the bike so the line is as vertical as possible and gently tap the calliper, line and lever to see if you can convince the bubble into the reservoir, this is a temporary fix but will confirm that the problem is air.

An oily pad will feel firm if you pull the lever but will not grab the disc when you're riding. They often feel just fine if you push the bike with no weight on it.

To test this you could pull out the front pads and see if they work better, be sure the clean the disc with some alcohol first.

The easiest way to fix dirty pads is to buy new ones.

Brakes that are not run in properly feel like oily ones, just not to the same extent, and are easily fixed by following the run in procedure in your manual. This is usually getting up to speed and stopping as hard as you can 5 or 10 times.