During a flare up I go on a fiber restricted diet. Fiber is abrasive on your colon wall, which will cause some pain if it scrapes against the ulcerations. I tend to stay away from dairy except yogurt with lots of probiotics. You need the probiotics to reconstitute the good bacteria/flora in your gut, and probiotics are found in almost all yogurts. During flare ups, I also found that eating soft foods help, like baby food (surprisingly some are really good), soft and ripe bananas, porridge, squash, soup, lots of fish (the omega 3 oils are really good for you). If I am daring, I will eat some meat but will be sure to chew extremely well. Rather than drinking regular milk, I drink Lactaid, which reduces the gassy effect. On that note, stay away from foods that make you gassy, like beans, soy, etc.
As for bluecalssring's recommendation, I also found that the Specific Carbohydrate Diet (SCD) by Elaine Gottschall to be very effective. It's similar to the Atkins' Diet but not as restrictive on the carbs as you can eat fruits and good grains. I was on the SCD for about a year after my first flare up in December 2002 and stayed in remission throughout that time. It was great but in the end difficult to maintain because I started craving pizza and pasta - foods which are prohibited on the SCD. I plan, however, to discipline myself again and restart the SCD.
Diagnosed UC in December 2002
Currently recovering from a flare up. On Remicade, 6MP, Asacol, Cannasa, Cortenema, Prednisone, Probiotics, Olive Leaf Extract.