Write lyrics for your song in a notebook. Leave a blank line in between each line of words to later insert guitar chord changes. Not all songs require lyrics, but if you want words, writing the them down first can give you a foundation to build your guitar parts around.
Set your amplifier according to the type of electric guitar song you want to write. If you plan on writing a heavy metal song, turn on the distortion. If you want a blues song, turn down the treble and set the tone to a clean channel. Tailoring the sound of your amplifier to the type of song you want to write can boost the creativity of your writing.
Work out the progression of chords first. If you've written lyrics ahead of time, it's helpful to write down chords over the words where they begin. This is called a lead sheet, which is used frequently for songwriting on guitar. A lead sheet is the bare bones of the song. It dictates the harmony and tonal center of a song while leaving room for other members of the band to create more detailed parts.
Record your chord progression. Even if you aren't an accomplished singer, sing along as you play. This will give you a rhythm track to work out other guitar parts, such as the solo and any additional riffs (which are generally repeated rhythm figures). As you create solos and riffs, let your imagination wander. Try variations on the same ideas. This is called improvising and can often lead to some of the best song material.
Notate your music in a way that's comfortable for you. If you can write traditional notation, use it. If not, draw a graph with six horizontal lines representing the strings on your guitar. Write fret numbers on these lines to indicate where specific notes should be played. Some guitar players simply record the songs they write and never bother notating them on paper. In these cases, the lead sheet is the only notation needed.