The big advantage is center of gravity: their shape lets them sit basically flat, near the ground, and since engines are the heaviest part of a car, this gives the car a lower center of gravity, which is good for handling.
The main disadvantage is mechanical complexity: instead of all the cylinders lined up in a row, with the crankshaft on one side and the valves and dual cams on the other, you have two banks of pistons, each with their own camshafts. So now instead of two camshafts, two camshaft gears, and one timing belt/chain, you need double all those. This of course increases cost too.
Flat-fours also tend to have rather distinctive exhaust notes, which not everyone finds pleasing.
Another notable place flat-4 engines are used is in small aircraft. Lycoming and Continental engines for small (e.g. Cessna) airplanes and helicopters are all flat-4.