In many cases a woman will know whether she will have to have a cesarean or not. Her doctor will already have discovered that for instance the fetus is positioned abnormally or she is pregnant with triplets. In other cases the need for cesarean will arise during labor. It is important to note though that all problems describe above do not always necessitate a C-section. There are many women that vaginally deliver despite a problematic birth.
Vaginal birth is always preferred, all other things being equal.
The recovery time is a lot shorter, in the long run there is less pain for the woman, and the medical risks for the mother a lot lower.