I think it can be both. For instance, I have clinical depression. From what I understand, I'm lacking in the chemicals in the brain so it has to be replaced by the antidepressants. I've been on them for about 40 years so far. I'll have to be on them til I die. I tried getting off at one point, and ended up in the pits of hell. Never again.
I also think it can be environmental/learned. If you were brought up in a "toxic" environment, i.e. neglectful parents; unemotional parents; addictive parents; abusive parents; financially needy household; too many children that some get "left out;" etc. Those type environments can certainly cause depression.
I was brought up with alcoholic parents who totally ignored ALL of us. There were 4 girls and we got absolutely NO attention at all. So all of us are afflicted with depression. I'm the only one who has sought treatment -- maybe I was the craziest.
But I do think it can be BOTH biological & environmental/learned. All I know is that it's miserable! God bless & take care. Hugs, Lee