Brian wrote it (without help from other Queenies). Because Freddie was ill and wanted the others to give him as much material as possible, Brian -who actually wanted to keep it to himself originally- presented the song during The Miracle sessions. The song was demoed, but not finished and consequently rejected for The Miracle. After Freddie died we all know what happened to the song. Brian put it on his solo-album afterall, had a hit and eventually the re-worked demos/finished track from the Miracle sessions ended up on MIH.
I personaaly like Brians version better as I do believe he ment what he was singing, although I believe it was inspired by Freddie. Also the British public like Brians version better:
Chart Positions [UK]:
Brian: Number 5
Queen: Number 15
I like Freddie's version. This song wasn't wrote about Fred actually, so this 'special meaning' came only after Freddie's death. I preffer live Brian's version more than studio one. It's just my opinion!