For the most part, this comes down to practice. The insight in seeing which identity gives you the most efficient path to the solution comes with experience, however a little trick I like to use (silly as it may be) is to use little rhymes or phrases to help remember certain identities that are not provided to you in the exam. An example of this would be in remembering the trigonometric identity '1+cot(^2)x=cosec(^2)x', by thinking of it as the phrase 'One in a cot is cosy', where the one corresponds to its number, cot is self explanatory, and 'cosy' refers to cosec. One more thing to keep in mind, is that when working with identities in multiple functions, always try to change every function into one type immediately before proceding. It makes it much easier on the eyes to work with when you're dealing with functions of the same type.