Guns do not cause suicides, but the urge to kill yourself generally comes and goes fairly quickly. If a gun is handy the attempt is often successful. 

Others means of suicide tend to be less effective so if there is no gun readily available there's a better chance the person would survive the attempt and outlive their suicidal urges.