Why isn't my vinaigrette emulsifying properly?
As Michael mentioned, a shaken vinaigrette is only going to stay together primarily while you're shaking it.  If it's been staying together long consider yourself lucky all the other times...this time was what should be "normal".

The more particulate such as herbs, mustard, spices, etc. that you have in a vinaigrette the quicker it will emulsify and the longer it will stay emulsified.  The particles of spice and herbs act as physical barriers that help to interrupt the droplets of oil so that they aren't able to coalesce and come together as they can when you have just oil and vinegar/acid.  

When doing vinaigrettes by hand using a whisk, start with your acid and add the salt along with anything else, leaving the oil last.  Adding salt to the acid component will help it to better dissolve so you get a truer reading on the flavor.  When it's added last as it's usually written in most recipes: "season to taste with salt and pepper", the salt usually hasn't dissolved by the time you taste it and you're much more likely to add too much, resulting in a dressing that's a bit saltier than you might like.

The manner in which you drizzle the oil and manner in which you whisk it when doing by hand, are also important factors.  When whisking vinagirettes by hand, drizzle the oil form a higher level so that as it hits the bowl you have a finer stream that's easier to emulsify.  Also, use a back and forth "zig-zag" motion rather than a circular whisking motion.  The "zig-zag" motion will allow the wires of the whisk to better break up the oil into droplets and emulsify them with the acid.  Using a circular motion creates a vortex in the center of the acid where the oil tends to pool, resulting in an oily vinaigrette.

The great part of using an immersion blender (aka stick or wand blender) is that EVERYTHING can go in at once.  Use a container that's deeper than it is wide (such as 2 cup liquid measure) so that there's plenty of depth for the liquid.  Garlic, shallots and herbs can even go in whole.  The immersion blender will blend up your garlic, etc. and emulsify the oil with the vinegar.  An immersion blender or a standard blender provide you with a the most stable vinaigrette.