I would interpret the meaning behind "it rains when you're here and it rains when you're gone" as "it's sad when you're here, and sad when you're gone" (to put it quite simply).
In art and lyric, rain usually represents sadness, a bad turn of events, a serious atmosphere...
Therefore, it appears to me that she is evoking this imagery to express the hopelessness of the situation - regardless of whether she has "him" here or whether he's gone and left her, it's always bittersweet/sad/lonely...
Same with the lyric "it rains in your bedroom" - a metaphoric rain symbolizing that something is wrong and she's feeling down.