Re: how do you write?
Can't... resist... this... joke....
What's the last thing a drummer says in a band?
"Hey guys, why don't we try one of my songs?"
In all seriousness, getting up on your piano skills and musical theory would be a great asset. With some exceptions, most ideas can be translated from piano to guitar - it can be a simple as a melody over a chord progression that turns into a lead / rhythm part. I've recently started using the garageband program to record ideas for band mates, super easy to get what's in my head into a format they can listen to. I'm not quite that proficient at keys to be able to perform my ideas live, but with just about any recording software you can edit your work and touch up and tweak to get something that you are happy with.
I've also found that developing a musical "language" with band mates is essential, so when we work on something new, I'm able to contribute in the jam space by talking about the song or riffs in a way that others will understand. Singing or humming a tune even works sometimes.
As much as it's great to be able to contribute, don't loose focus on what your job is in the band... see above joke.