Confusion in usage of formulae for power dissipated in a circuit When should we use $\frac {V^2}{R}$ and when to use $I^2R$. Because many times they ask about the power without giving details about series and parallel. I am really confused 
 A: When you are calculating power consumption of some electrical device, you will find that $P=f(I,V,R)$, where you only need to know two of the three variables I, V, and R.  The two known values will determine which equation is appropriate.  For example:
$P=IV$
$P=I^2R$
$P=\frac{V^2}{R}$
A: It is always true that the power supplied/used by a circuit element is given by $P=IV$.
If you are interested in the power dissipated by a single, ohmic resistor such that $V=IR$, then either relation you ask about is sufficient. i.e. $P=I^2R$ and $P=V^2/R$ will give you the same result as $P=IV$.
However, if you are looking at the power consumed by multiple ohmic resistors, then you need to be careful. It is best to start with $P=IV$ for each individual resistor, and then add up the total power dissipated. Although you will find that you can obtain similar equations to the ones above.

For a simple example, let's consider $N$ resistors that are all in series with a power source of voltage $V_s$.
For the total power dissipated then we have $$P=\sum_n^NI_nV_n$$ 
As you might know from your studies, our circuit has an equivalent resistance of $R_\text{eq}=\sum_n^NR_n$, and the current is the same through all resistors and is given by $I=V_s/R_\text{eq}$.
Therefore, our power is given by
$$P=I\sum_n^NV_n=IV_s=I^2R_\text{eq}=\frac{V_s^2}{R_\text{eq}}$$
I will leave the parallel example to you (or even thinking about more general circuits that are not as simple). The point is that when you are unsure if certain formulas hold for more complicated circuits, just consider one element at a time and build up from there.
