Which identity you use totally depends upon which side is given. If you only have an angle and the hypotenuse, using tan is useless as you don't have the opposite or adjacent. However, if you have two sides and an angle, you can use any trig ratio you want, as all of them will give you the right answer. Hope this answers your question?