White vinegar works well for lightly rusted metal. Followed by a rinse out and a dry. It will flash-rust again quite quickly though.
For looser/flaky rust, a handful of nuts loosely threaded on string in the tank with some petrol added then swirled about will knock the rough bits off. Follow up with plenty of rinsing. The nuts are on a string so you can fish them out again. In the old days people used to quarter fill the tank, throw in a handful of stones, wrap it in a duvet then put it in a cement mixer for half an hour. Modern tanks are much thinner steel though so I wouldn't recommend it.
Be aware, it's not unusual to find pinhole leaks appear after de-rusting a tank.
For a really good, permanent fix for a rusty tank, I can highly recommend the POR15 system. Consists of an acid flush, a degreaser flush then a paint-like resin (goes on like thick silver paint, you pour it in and swirl it round to coat the inside). This will remove loose rust, stabilise the rest, block any holes and give you a permanant, corrosion (and ethanol) resistant coating on the inside of the tank. It is vitally important you follow the instructions properly, particularly with regard to the tank being thoroughly dry before applying the coating. Works out about £50-ish to treat a motorcycle tank.
I've heard of people using POR15 as a primer on bare metal then trying to remove it with a wire-wheel and failing. It's almost like galvenising (in appearance and toughness) after it's set.