If you consider only a single interval without musical context, you will find a huge variety of songs and moods to the extent there seems to be no concrete mood for any particular interval. One convenient way to confirm this is to look at a list of songs organized by the first interval of the melody. (Such lists are popular for learning the various intervals.)
Notice the huge variety of songs and moods for each interval!
Minor third: Frosty the Snowman versus Ironman, Black Sabbath!
Major third: Kumbaya versus Swing Low, Sweet Chariot!
Clearly we don't want to simply say minor third = sad, major third = happy.
From an abstract - rather than emotional - point of view an interval can be very important to composing a melody. A particular interval can form a motif used to build a melody. If you want to know more about that try Schoenberg's Fundamentals of Musical Composition.
Back to the emotional and expressive considerations. More music context than a single interval may be needed to convey an emotion, but perhaps not a lot more music. So two notes making a minor third isn't enough, but add two more notes to outline a diminished seventh chord and you will have something that sounds dramatic. Another common thing is changing intervals to change the mode. For example, changing the minor third of a minor chord to a major third and create a sort of uplifting sound. (Notice how that plays with the musical context.) Be aware if you take this kind of mood painting too far, it can sound stereotypical or cliche. You certainly don't want to aim for profundity, but come off sounding cliche.
Some answers say there are 'rules' for writing melody. Sort of. What I have seen mostly comes out of rules for writing a cantus firmus. Those rules are meant to apply to a musical style like Palestrina's. (Music of the Italian Renaissance.) Characteristics of that melodic style can be found in other styles too, but keep in mind the historic origin. Lots of melodic styles don't work like a cantus firmus.