Lets begin with the definition of an idiom:
An idiom is a widely used saying or expression that contains a figurative meaning that is different from the phrase's literal meaning. For example, if you say you're feeling “under the weather,” you don't literally mean that you're standing underneath the rain.
To me "under the weather" means not feeling well, my assumption being that the rain is the symbolism for sadness.