Writing a song by yourself can be a very difficult challenge but its a necessary trial that a musician must face in order to improve & learn. The most important aspect to focus on is imagination. Your creativity is the key to creating a composition. With guitar in hand think about some of the rhythms/melodies that you hear inside your head. When your writing a song, you should have some idea of want you want it to sound like. Tempo's, mood, key, etc. Once you have this general outline in your head you will be able to compose. If your starting out with a riff that fits this outline decide where you want to place it in the song. If you are starting out with nothing but this general outline of tempo/mood here is a tip. I have found that learning another song by band/artist that fits this outline can help you come up with some of your own ideas. You do not want to copy any material but there might be a set of chords, and melodies, that you can tweak to your liking. Make it your own!
Ok, you have written a riff but your not quite happy with it... Break it down, split it up, and put it back together. Sound the notes in your head. A typical rock riff follows the same pattern but it may have different endings and hooks. Your riff doesn't have to be extremely complicated but it shouldn't be monotonous. Try different endings and passages to give it some more texture. Try using lead runs that are an octave higher than the original riff. Later on if it fits you can even add a harmony to give it some extra meat. By the time your satisfied with your riff its important to commit it to memory. Play it several times until you believe its where it should be. Now think about where you want to put it in the song. How does it sound to you? Like an intro, bridge, chorus, etc. How does it fit in? The next step is very important and your going to rely on your imagination. Lets say that its intro riff ok. You need to build on it in a fashion that fits the type of song your trying to write. Intro's can start with a bang or they can lead up into the groove of the song. Imagine what comes next. This can often be frustrating but it is always good to have a starting point. From this starting point branch out from your original riff. Try out different chords, tempos, get a groove. If your riff is fast, slow it down or go faster. The same if it is slow. It is also ok to keep the general tempo for the whole song like most AC/DC but if you got the Foo Fighters vibe going they change it up a lot for example "Arlandria".
When you have at least two riffs that your happy with its time to connect them. You want them to be together in the song at this moment not in different areas. If they belong in different areas save it but come up with something with the two together. Sometimes the riffs might lead into each other perfectly, other times you need a fill. All Killer No Filler does apply when writing a fill. Though this may sound contradicting its good for the fill to carry as much weight as a regular riff. It should hook you into what's coming next however. A fill does not need to be complicated whatsoever. Often guitarists will do a bend with the last note of the previous riff and then move into the next one. If you play in a band you can also leave room for the drummer to do his/her thing. If your writing a rock song that includes other instruments besides guitar you also have to think along the lines of how those instruments will fit. You do NOT need to write anything but the process of thinking has to be there. Back to fills, try out a lead run with the octave suggestion from earlier. Bends, Dive-bombs, Pinch Harmonics, Natural Harmonics, etc all work. Just make sure to count out the time of the fill. You can use a metronome or go old school and tap out your foot. Make sure however, that the timing is correct and smooth.
Up till now you should have a good amount of riffs and a strong grasp on what your trying to write. I cannot write these riffs for you so by follow my advice and putting in the time and effort you will reach this point. Now quickly on the Chorus. Every song has a hook and it can usually be found in the chorus. Make sure your chorus has a hook to it and you should be able to repeat it throughout the song. For a chorus its helpful to start out with a chord progression that you really dig then you can figure out the lead afterwards. If your including a solo in the song, same idea. Usually the rhythm comes first and you solo over it. However, if you have a specific solo in place ready to go and no rhythm your going to usually have to make sacrifices. Its key that the solo can fit along with a rhythm because if your time is screwed up it just kills the whole idea of having a solo. Its nice to showoff your talent but you don't want to leave the rest of the band clueless to what they should be playing behind you.
You have, riffs/bridges, chorus, solo,. You started out with this outline and the different pieces sound good. They just won't seem to fit. If your in a band setting its extremely helpful to get the opinions of everybody on the construction of a song. Its almost guaranteed that you will have to make some sacrifices but if there are some pieces that you really like fight for them. If your not in a band setting and don't have other sources of input. Its a good idea to record. If you have a program such as Pro Tools, GarageBand, Ableton, etc use it. It is there for you so you can tweak your ideas. For beginners I would recommend GarageBand/Ableton for it is really simple and easy to use. You won't spend hours reading through instruction manuals and fighting with digital dials.
You have your song and it fits the out line you've given it. If your happy with the overall construction play through it and tweak what you need too. There is always going to be something that can be improved. Hopefully this article gives you a starting point on writing your own compositions. If you have any questions shoot me an email - jwalk3r.2012[at]gmail[dot]com