It all depends on the way YOU want it done. Personally, I would paint
first (with eveything off the wall) and then have the flooring laid.
That way you don't have contractor walking through your house on your
new carpet with dirty boots. And like the other posts, I agree that
paint and tile laying can really make a mess. Besides, it's easier to
paint without anything on the walls and no trim. It'll be done quicker
and if your painter is charging by the hour, it should cost you less.