Every time I've looked at this the contract has been better financially as the networks subsidise the handsets.
BUT
You are tied in, usually for longer than you want and you often have to get a higher plan than you actually need to get a free phone.
So, if you find a plan that really suits you and you don't mind not having a new phone for 18/24 months then go for the contract.