Working with MDF is different than working with wood. MDF is very compressed and it tends to not hold fasteners as well as say, plywood will. If you use screws, you need to use coarse thread screws so they will "dig in" to the MDF. If you use a fine thread screw, it will not hold well because the threads just fill up with the MDF dust that you are creating as you drive the screw in and you are left with little to no "grab" into the MDF. You should also pre-drill your holes which 1) extracts the dust that would otherwise pack into the screw thread, and 2) allows you to drive the screw in more easily and prevents you from cracking the head right off the screw before it is even halfway in. If you have ever tried to drive many screws into MDF without pre-drilling your holes, I'm sure you cracked off a few screw heads or ruined a few screwdriving bits in the process. This is due to the density of the MDF.
Screws also have a high propensity to "blow out" your MDF if you try to screw into the edge; again, this is due to the density of the wood. Think of water displacement... fill a glass and drop an ice cube into it and water will spill over the edge. Same concept with MDF. It is so dense that the area your screw is occupying HAS to be displaced somewhere else.
Thirdly, screws are way more labor-intensive to cover/fill when finishing than brads and the tiny hole they leave behind. Brads (sometimes called "pins") are very small in diameter...18 gauge usually. With a compressor set to around 100psi you can easily countersink a brad into MDF. Brads do not displace the MDF the way screws do, rather, the brads just "super compress" (for lack of a better term) the material ahead of their path as they enter the MDF. No pre-drilling needed, no dust extracted, no broken screw heads, no broken driver bits, no blisters, no sore wrists, no blown-out edges, no muss, no fuss.
Either way, you should always, always, always use glue to get a strong bond. Without glue, you could easily pull apart two pieces of MDF, regardless of fastener used.
MDF just plain sucks to work with. The dust is very fine, gets everywhere and all over everything, it is toxic, and it smells like sh**. MDF is also extremely brutal on carbide and HSS tools and dulls them at a much faster rate than non-composite woods do. The ONLY reason to use MDF in my opinion, is if you plan on painting your work. If you are going to laminate/stain/whatever instead of painting, use plywood every time.