Damaged rim or just the tube valve? I had a flat on the way to work today.  Not really earth shattering, it was about 5 miles in, only a short walk until the office, where I could fix it in comfort.

But walking the bike, I noticed an odd behaviour.  The flat was on the front wheel, and I noticed that once per revolution, the handlebars would turn slightly to the left.  Very consistent, just as the valve would get to the bottom of the wheel.

What would cause this?  Is it just the valve being slightly thicker than the (now deflated) tube, or did I somehow damage my rim in the short while between the puncture and me stopping the bike?
It's possible you damaged your rim, but it should be very easy to check. Turn the bike over and spin the wheel and eyeball it both side to side and up and down. If you have put a flat spot in the rim it should be very noticeable.

It's more likely that it is just the way the (flat) tyre is sitting on the rim, which might well be affected by the valve. If you've got a narrow tyre and a lockring on the valve, that may be holding the tyre on the rim at that point only, causing a wobble when that part of the wheels hits the ground.