What are the criteria that govern the choice between titanium, composites, and more common materials, like aluminum? In the newest large commercial jets, composite materials seem to be all the rage. The first thing I wanted to know is why composites were chosen instead of titanium? If I'm not mistaken, titanium has even more specific tensile strength.

Let's also be clear about what exactly composites are. "Composite" just means a mix of two or more materials, and in aerospace, it is predominantly autoclave-cured carbon-epoxy.

Ultimately, it would be good to understand the criteria that govern any choice among titanium, composites, and aluminum. Specifically, which areas of the plane are candidates for an advanced material? and why? What factors dictate the decision?
What are the criteria that govern the choice between titanium, composites, and more common materials, like aluminum?


Three main criteria: cost, strength-to-weight ratio, and fatigue resistance.


Cost. Of the three, aluminium used to be the clear winner, with composites having made large advances due to improved manufacturing processes. Titanium is the most expensive and is difficult to machine. 
Strength-to-weight. 


Buckling. Titanium alloys have higher strength-to-weight than aluminium (this answer, more on temperature below), but aluminium is lighter and that gives it an advantage in structures loaded with compression stresses: buckling resistance is a function of cross sectional dimension as well. For the wing upper surface aluminium would be lighter than titanium, despite the lower specific strength. Composites have the highest specific strength of all.
Temperature. The graph in the linked answer also shows the influence of temperature on the specific strength of materials: aluminium is first to drop, and at higher temps titanium is the best next choice, as from the comment by @PeterKämpf.

Fatigue resistance. Titanium alloys, like steel allows, have a fatigue endurance limit. If stresses remain below this limit, the construction can endure an endless number of cycles. Aluminium does not have an endurance limit, and will eventually fail even from small stress amplitude cycles: aluminium constructions require careful monitoring and maintenance for prevention of fatigue failure.  



Composites do not have an endurance limit, but fibre orientation and material choice can improve fatigue life.


Image source