There are two distinct sets of royalties involved when it comes to a recording, the writing royalties and the mechanical royalties. They are 50/50 of the total royalty earned for the sale of a song or for the play of a song. The writer royalties come back to the writers of the song regardless of who has recorded the song. By that I mean if an artist records a cover then he gets 50% of the total royalty, which is the mechanical royalty and the writer royalty goes to the writer/s.
For the mechanical royalty, there is no set split, but as boydie said it is best to agree upfront. The norm is that evetyone who has played gets a split of the royalty earned. The exception to this is when some of the members have been paid to play on the recording ie: hired to play, they are the usually exempt from royalty in that they have be paid upfront so the split goes to the remainder of the band.
For writers royalties, again there is no written rule but splits are made in terms of contribution and should be agreed upfront. Some examples to note would be Lennon/Mcartney, Its pretty much a given that George and Ringo wrote their own parts but they dont appear on many songs as a co-write. Burton Cummings once wrote a tune and the Bass guitar suggested a change of one word in the song, Cummings gave him a co-write for that small act. As you can see its a very fluid and fairly grey area.
In general its who ever writes the melody and lyric that gets the writers royalties. The players get their cut via the mechanical royalties.