Some people say it's loosely based on the murder of Gary Lauwers by Ricky Kasso, though that seems a like a bit of a long shot considering Kasso was a psychopathic satanist who tortured then stabbed Lauwers 17 to 36 times.
More likely it was based on a newspaper article Dave read about an 18 year old named Ricky who was sentenced to life imprisonment for shooting and killing somebody with a gun he thought was unloaded. But I supposes you already know that.
The tragic irony to this song, however, is the story of Pat Sullvian - the man who played Ricky in the music video. He had a band, he got the part in the video, he was thinking of going into film, but he has bipolar, drank too much, and it all fell apart. He lived, and may still be living, Ricky's life. His sister used to have a blog, desperately calling out for help. She didn't know from one day to the next whether he was dead or alive. Things have looked up a little in the last year or so - He's still homeless, but had sobered up and at least partly reconnected with his family.
Sorry, I didn't really answer your question.