Rock bands are usually thought to be pretty collaborative in terms of songwriting: the common way to visualise them is having the singer coming up with the lyrics and melody, the guitarist with the guitar parts, the drummer with drum parts, etc. It may have been the case with many of them, but not all: in The Beatles it didn't happen, in Kansas it didn't happen, in Iron Maiden it didn't happen, in Eagles it didn't happen and, yes, you guessed right, in Queen it didn't happen.
On the contrary, it was very common that one single band member wrote and composed everything in a song, including the lyrics (even if he didn't sing them at the end), the guitar parts (even if he didn't and/or couldn't play them), the drum parts (even if he didn't and/or couldn't play them), etc. The whole 'lyricist = credited person' rule was just a stretched myth originated by the 'As It Began' book, which has very few mistakes, but this is one of them. After all, A Hard Life is credited to Mercury and not May/Mercury, Is This the World We Created is credited to May/Mercury and not the latter, etc.
In the very early days, songs were more collaborative and all three founding members discussed the details including form (e.g. how many choruses should there be), rhymes, drumming patterns, etc. In those cases, the person who'd initially come up with the skeleton would be the 'owner' of the song and also responsible for all or most of the lyrics. That also played a key role in the diversity of the band and provided a good diplomatic excuse for members not to discuss their band-mates lyrics, which is something loads of musicians are annoyed with.
According to the points above, we can be pretty sure (not positive) that, more often than not, the person mentioned between brackets next to the song in the liner notes had been responsible for all or most parts for all or most instruments and had penned all or most of the words himself. There are exceptions of course, like the bass-line in Magic or the Bo Rhap guitar solo, but those are that, exceptions.
From 1970 to 1986, there were some occasional tracks credited to more than one band member: double-credits usually indicated one had written words and the other had written music (e.g. Is This the World We Created) or that the track had
been spliced together from fragments written by different people (e.g. Thank God It's Christmas), or that they'd both been for the whole process, coming up with ideas and correcting them, providing feedback to each other (John S. Stuart had a very nice analogy for that, comparing the process to a tennis match).
There were also some songs credited to all four of them, a practice that became the norm for 'The Miracle' album (recorded between January 1988 and January 1989), which as Mercury's PA and best friend Peter Freestone mentions in his book, 'stopped some arguments and made the accountants' lives easier but in the studio things were just as fractious.'
Queen continued with that rule for 'Innuendo' (recorded between March 1989 and November 1990) and for some songs in 'Made in Heaven', but not all of them. Fans and experts often wondered about that situation and were eager to know who was responsible for each song, in a similar way to how the press and the public researched, analysed and sometimes guessed about which Lennon/McCartney tunes had been Lennon and which had been McCartney.
When interviewed for the BBC in May 1989, the band members were promoting 'The Miracle' and had recently started the 'Innuendo' sessions. Brian commented that it'd been a very good decision to credit them all for everything as it stopped fights over which the single should be and stuff like that, but already in that interview some actual authorships were cleared by the band: Invisible Man and Breakthru' (except for the intro) were Roger's and My Baby Does Me had been chiefly Freddie's with John having a strong input as well; The Miracle was, lyrically, a four-way split but it wasn't confirmed who'd come up with the music. Same for the rest of the album.
From then on, the occasional interview would shed some light on it, and more and more actual creators would be informally credited that way. But not all of them. Some day in late 90's, shortly after 'Made in Heaven' was released, some people in a discussion group compiled an unofficial who-wrote-what list for those songs, and for some upcoming years it'd be regarded 'common knowledge' by the fandom.
The good news is that they'd done their homework and heard and read a lot of sources for some songs such as Scandal
or I Can't Live With You. The bad news is that, due to the lack of enough information, loads of guesses and stretches had to be made: for instance, when realising Roger had been the chief lyricist for Innuendo, they assumed he'd also composed the music (nothing further from the truth) and the legend began to be spread; same for several other songs; in the case of Don't Try So Hard, they used the apparently logical argument that John Deacon 'must have had' written something, and by ruling out the other eleven songs in the album, it seemed to be crystal clear.
In November 2001, a friend of a friend of mine interviewed David Richards for a book called 'Queen File', published the next year only in Japanese (a language I can't speak BTW). Our mutual friend was kind enough to send me the original transcript (or a back-to-English translation) and I realised several of the 'credits' that had reigned for nearly seven years were spot-on, others weren't.
Some day in 2002 I compiled a new unofficial list of 'who wrote what' and published it via QMS and QueenZone. At the time I was still a 'newbie' so the usual reaction from most people was 'this is shit'. I was quite defensive to harsh criticism myself (still am, when I consider it's unfair) which didn't help: the arguments seemed illogical, the idea of 'reverting' the status quo was preposterous and the fact David Richard's quotes were only printed in a Japanese book (which, most may have thought, I could've easily made up) didn't do a lot for my credibility.
My 2002 list was far from being a definitive one as well, and while it corrected several mistakes and myths, it had let some through. Thanks to loads of corrections, endless heated on-line debates and a bit of luck, the 'list' has become better and better each year, although it's quite obvious that at the end of the day there are things we'll never know about.
John hated HS. Frederick's favourite singer was not PR. Roger didn't compose 'Innuendo.' Witness testimonies are often inaccurate. Scotland's not in England. 'Bo Rhap' hasn't got 180 voices.