There isn't normally one reason why someone takes their own life. Suicide is complex, and it is normally the result of several factors that put someone at risk.
Instead of trying to blame or pinpoint, focus on remembering the person's life, supporting those who are grieving, and looking after yourself.