Rule #1: Vincent is always right
Rule #2: In all other cases, apply rule #1.
Seriously; If I quickly compare Flatfiles to a database then...
Flatfiles can't handle more than one user at a time. - Databases can handle thousands.
Flatfiles don't have indexes so the file must be read/written completely for every query/update/insert. - Databases have indexes and sometimes even functional indexes.
All the functionality must be written from scratch by you. - Databases use SQL which comtains more functionality than you'll ever need.
There is no crash-recovery. One corrupt file and you're done. - Databases can recover from crashes through their (transaction) logs.
In short: development time with flatfiles: several months. with databases: a few weeks.