Learning production is like learning any musical instrument in a lot of ways. You first need to practice a lot to become very familiar with your software. The software is your instrument, you need to know it inside and out to become proficient at creating songs. For instruments, daily practice is the fastest way to improve, and the same goes with digital production. I try to write/produce something every day.. even if it doesn't turn into a song it helps to just sit down and play with sounds for a bit. You need to get to a point where you know the software and everything it can and can't do. This way, when an idea strikes, you don't have to fumble around finding a synth patch or learning how to use the piano roll, you already know the software so the ideas can flow freely. There are tons of websites and YouTube videos out there dedicated to production and electronic music, and plenty of good ones focused on FL Studio.
After practice, you are going to need to learn some music theory. There are a lot of good resources out there to learn music theory (see YouTube, free websites, or books like Theory for Computer Musicians. That book is very useful for beginners, but there is also Harmony For Computer Musicians if you know some theory already so it goes a little deeper into chords and the things you need for a full song). This all depends on how much music theory you already know.. you don't actually need a whole lot to be a successful music producer, but you do need a foundation of major/minor scales, harmonizing scales, melodies, rhythm, and obviously chords. I find a lot of DJs or non-musicians get into production and without any background in music theory and they can make some okay mixes but usually nothing exceptional until they get a better grasp of how music works.
Edit (more on melody): Theory is also where solid melodies come from. Some people can pull melodies out of thin air just by listening to a chord progression, but for the rest of us it helps to have a basic understanding of the chords and what scale they relate to. Without theory, you can still come up with melodies, it just takes more trial and error. Start by building up the skeleton of a track: drums, bassline, maybe some chords.. then just start playing notes to see which ones fit. Once you find the "scale" or notes that work within the song, just mess around with them while you play the rest of the track until you find something interesting. Then repeat it, alter it slightly for variation, and you've got a melody.
Finally, after theory and practice, you should start analyzing songs you like. This is a time-honored tradition among musicians, especially guitarists, we like to sit down and learn to play songs by ear. This accomplishes a number of things: we improve our ears and how quickly we can hear intervals/chords and identify them (ear training), we learn how our favorite musicians structure their songs and where the chords/melody comes from (theory), and we also get a chance to practice the physical techniques behind certain sounds (practice). All of this can transfer over to production as well. Take some of your favorite songs, and throw them on a track in FL Studio and try to recreate it layer by layer on your own. This is actually a pretty important skill, because as a musician you will often hear things in your head- ideas for melodies or whole songs- but if you can't translate what's in your head to what comes out of your computer you might lose those ideas before you get a chance to make use of them. So this is where hearing someone else's song and figuring out how to recreate it can help. If you can hear something and copy it well, chances are the text time you hear some magical symphony in your head you will be better able to reproduce it in your DAW.
I already mentioned YouTube, but I want to mention it again as it is a really solid resource for this sort of thing. I don't use FL Studio, but I'm sure there are plenty of videos on how to produce house or drum and bass in FL. Also if you are very serious about this production thing you might want to look into a software upgrade. FL Studio is good software, but there are better DAWs out there (in my opinion). If you are going to be spending hours every day/week learning software, you need to make sure it's something that will be worth the investment in the long run. Ableton is my personal favorite, as its great for sketching out ideas and jamming with yourself, but there are other quality options out there. If you are happy with FL Studio, stick with it. I know a couple people that use it to get professional-sounding results. But try the other big DAWs if you get a chance, you might find something else that suits you better.
It takes a lot of time and practice to become a great music producer. But if you learn your software, learn some theory, and learn where your favorite songs came from, you should be off to a pretty good start.