I can choose to study for a year in either Cambridge or Oxford.
You are very lucky. These are two of the finest universities in the world, and both are great cities to live in. However Cambridge is more successful at spin-off business than Oxford, creating a cluster of high-tech business around the city which is unmatched by Oxford, even though the latter is a substantially bigger city with an industrial tradition.
Also, how will prices for rent, consumer goods, transportation, etc., compare?
Little difference. Both have a high cost of living by British standards.
trains to London
I would say that Oxford has the better transport offer, though these things can end up depending upon which precise journey it is you particularly need to make. From Oxford, there is a highly competitive market for buses to London, such as exists from no other city in the country. Even though the core journey time may be longer, that can be set off against the potentially more useful places the buses depart and arrive. They also help to discourage the rail company from overcharging you, at least at off-peak times. A new train service by a different route, and operated by a different company, taking about the same journey time as the present service, starts running from a new Oxford Parkway station in October, and will be extended into the main railway station sometime next year. This is bound to increase the level of competition, as well as richness of the offer. Cambridge also has 2 railway services to London by different routes, but one is rather slower than the other one.