There are a couple of routes you may want to try.
Since you do not know theory, I will not get into that. But music does tend have a certain function and flow. I would say understand a scale... then understand a chord, and how chord fits into the scale. The look at common progressions in root and inverted positions. (You may first want to look up chord progressions... see what that is about it, look at examples [sheet music with the chord names above the staff lines - lead sheet chords]).
I think that is all you will need for the theory aspect. If you can figure that you (do not worry about exact details at first, just try and understand the point of it, the goal of it). If you know what chords are to be played, you can have a much easier time making up a bassline that harmonically fits into the scheme.
Two approaches to writing a song, or composing a progression is to either start with the bass or the melody. (1) If you have a lyric that you like, and you have a certain rhythm for it, I suggest you sing it to yourself. Hear where the voices go up and down. (Usually singing moves by half/whole steps, thirds, with the occasional leap. (Usually when there is a leap (more than a movement of a third), the melody tends to go the opposite direction. (Imagine you hit the climax of something, you would to descend before attempting to get to a high point again). So say you figure all this out, try and match your voice to the bass, play your bass on the higher register part. The bass actually plays notes in the treble clef, and the guitar plays notes in the bass clef! You can use this try and figure out the guitar melody part. When you got this, and say you understand how chords work, you can try and apply this to writing a bass line from a theory point OR you can just listen to what it sounds like, and work with it from there and see what sounds good.
(2) If you understand a little bit about chords, and their progressions, use the bass to just out line the chords. Start with a whole note, play that, then play another whole note. So that about 4 times. Say you have a simple, but decent sounding 4 note progression. You can now play those notes again, but instead, use your understanding of chords, and apply the fifth to after each root. (Play 8 notes, half the amount of time you did for the 4 notes - so it is 8 notes, but same duration as the 4 note sequence.) You can use this method to become elaborate with making something up. But just remember, it is not about how fast and how many notes, a rest (silence in music) can be much better than any note available.
I have seen people use loops of a bassline over a drum track, and then solo over it. You can do this once you figure out a melody and a bassline.
Learn song structure. Check out some songs and see how they build up a good song...
Intro
Verse
Chorus
Verse
Chorus
Bridge/solo
Chorus
Outro
Sit down and think about each section. Come up with a catchy rhythm that is a real attention grabber (do not be a snob about it) and make that the chorus. Lighten up a bit for the verse, let the words speak, but provide a solid foundation for the guitar and vocals to work. For the intro... try and use the idea of the chorus to make a theme. Your intro should have a bit of relevance to the chorus. The bridge and solo are always a good place for a modulation, but how that technically works is far beyond what is necessary. Just try and make a simple transition from the key you are playing in, into another key. A lot of the times if you are in a key, the relative/parallel key, the sixth, and the fifth make a good option to work. An outro should sound very final and should add a feeling of completeness to the song. Since you are doing a punk/grunge/etc influence, a cold stop (all the instruments stopping together on cue) is also an effective way to end a song.
So yeah, those are just some pointers without being too technical, I hope it helps you!!
By the way, I have never wrote a song in my life. So... yeah..
