Would insurance plan be necessary if we had instant access to credit? Assuming one could instantly have access to an loan to cover his recent loss/accident at an affordable interest, would it make sense to pay premium for an insurance plan?

I was thinking that it would make more sense to save the premium money and use it to pay part of a loan to cover the losses if it happens. That way one would save the trouble of paying insurance and never using it and make better use of that money. 

But I believe in economics. It wouldn't be such a big thing if it didn't make sense. So, how can one evaluate when it makes sense to pay for insurance or just count on a loan?
As Dave Harris' points out in his comment, I assume that your question deals with events that do not compromise the individual's ability to work, which would prevent her from taking on debt.

Let's take the example of a fire which happens with probability $\pi \in [0,1]$. The damage of a fire equals $D$ dollars, i.e. it costs $D$ dollars to repair the house. If the individual buys full insurance at a price $p$ she ends up with a final wealth equal to $w-p$ in all contingencies since the insurance company covers the damages.

Suppose now that she does not buy any insurance but contracts a loan to cover the damages. In order to repair the house she has to borrow $D$ dollars. This loan costs her $D'$ dollars over her lifetime, taking into account the interest and her time preferences (discounting). She then ends up with final wealth equal to


$w$ with probability $1-\pi$
$w-D'$ with probability $\pi$


Thus, the two distributions that she faces are different under these two solutions. If she buys insurance, she completely eliminates the risk of having to pay for the damages. By contrast, if she contracts a loan ex post she still has a large downside risk of $w-D'$ in case of a fire. Under the standard conditions of insurance theory (e.g. risk aversion, actuarially fair insurance prices) it is clear that buying insurance would be strictly preferable.