The question of the legality of the war turns on whether the UN resolution (1441) authorised the use of force against Iraq or whether another was required.
Tony Blair asked Lord Goldsmith (the Attorney general and chief legal expert) for an opinion on whether it did or not.
The UK and the US went to war with no further resolution.
Blair was for a long time evasive about the full content of Goldsmiths' advise and it seems that advise was ammended at one point.
His advice concluded
1/ that there was an arguable case on both sides
2/ it would be safest to seek an additional resolution (which was not done)
3/ Regieme change (removal of Saddm Hussein) could be accomplished but could not be a prime objective.
You can read the full text of Goldsmiths' advice here:
http://www.guardian.co.uk/Iraq/Story/0,,147245 0,00.html