Imagine Physics is Magic, not Science. So, how would you "know" what SPELL or incantation to use? (assuming you knew several). The answer is obvious: you use the one which will give you the result you want.
Just like physics: you use "the formula" which will give you the result you want. Now, this isn't really a very helpful answer, since the result you (probably) want is getting the problem "right" (getting 100% credit for the problem). But we can be a bit more subtle: getting 100% credit means answering the question that is posed (and probably showing your work).
So, you work backwards, usually. You know (or figure out, somehow) what "kind" of answer you want, and figure out how to get it using one or more formulas. The most important "way" to categorize an answer (a numerical answer, I mean) is by its units of measurement. For instance, speeds can be miles per hour, meters per second or leagues per fortnight, what they all share in common is they are units of distance ÷ units of time.
So, you need to be comfortable working with different units of measurement AND be familiar with various units. The SI system has units of distance, time, energy, power, voltage, and others as fundamental units with others often derived from them.
Oh, I forgot mass and weight! I usually give the following example of working backwards: Jane runs at 5 ft per second, how far can she travel in 35 seconds? Now, working backwards what is the desired answer? It asks for a distance (and in this case the units of distance are feet). So, the answer will be X ft. Next is to figure out what we have (what we know) so far. We know the question involves 5 ft/s and 35 s.
By inspection we see that multiplying 5 ft/s by 35 s will give us 175 ft.s/s and we should easily understand that s/s cancel so that 175 ft.s/s = 175 ft. In this case, we didn't use ANY formula. But the same considerations apply to deciding which formula to use, it's just that when you NEED to use a formula, you better be familiar with the UNITS of what you will get "out" of the formula (and what you "put in", too).
The formula for voltage, current and resistance of a simple circuit is V = iR (or E=iR ...the symbols don't really matter...) That expression is only part of what you need to learn, in order to fully learn the "formula". The other part is you need to learn the UNITS of V, i and R. (as well as the systems of units, which means which units should "go together".) If you don't know the units, you really don't understand the formula.
Once you know the units, its pretty easy to figure out whether you can or should use it to solve a given problem. Anyways, you've been warned about posting questions that are too vague to be clearly answered. What you need in order to apply a formula is understanding both the relationship of the variables of the problem AND the context of that problem.
For instance you probably wouldn't get the right answer in applying a DC formula to a problem with AC current. For most beginning physics problems, the formula is really obvious, IF you know the units being asked for for the answer (and the units that the various formula use).