Demeter said (almost ten years ago!) that lyrics generally come in three types: personal emotion, narrative, and "mystery". I think that this is pretty accurate for most music genres, but there is something very odd about rap lyrics. When I say rap, I mean the act of rapping, which is the common element in all kinds of rap and hip hop; so for simplicity, instead of 'rap and/or hip hop', I'll just call it rap for now. Rappers (A.K.A. MCs, hip hop artists, etc.) say a lot of things in their songs that any other kind of vocalist would be seriously frowned-upon for including in their lyrics. I'm not talking about the violence, swearing, sexism or general aggression; their subject matter would often just not be seen as 'proper' lyrics in other genres. As far as I have seen, rap lyrics come in 5 breeds:
Type 1: boasting.
The thing about which the rapper is boasting isn't all that important, but more often than not it is their rapping skills. They can also be boasting about their wealth, fame, or their popularity with the ladies, but in essence it is all the same thing. For some strange reason, rappers are allowed to write these lyrics, but no-one else really can. It seems strangely natural to hear Jay-Z telling you how great his songs are, but wouldn't it be weird to hear it from Paul McCartney, Moby, Bob Dylan, or even Miley Cyrus? This is probably the most common of the 5 types, and it isn't confined to bad rappers. Great artists like Pharoahe Monch and Mos Def write these lyrics, The Roots' album Things Fall Apart is composed almost entirely of them, and even The Herd have done a few. The only rapper I've seen who has never done one of these songs is Zack de la Rocha of Rage Against the Machine.
Example: Ain't No Half-Steppin', by Big Daddy Kane (also an unintentionally hilarious 80s music video).
Type 2: music.
This includes lyrics about clubbing, dancing, touring, whatever. Songs about songs, that's the gist of it. Whether it's lamenting the sad state of modern rap, complaining about how difficult life is for a millionaire rapper, extolling the wonders of performing live, or whatever. This kind of rap is more common in the more pop-oriented styles of rap, the kind that appears in the top 40, but it is still very prevalent in the better varieties. Admittedly, lyrics of this kind are not unique to rap (dance lyrics are almost exclusively of this kind), but they are certainly very common there.
Example: I Used to Love H.E.R., by Common (a classic song that uses a clever twist, but in the end is still talking about music).
Type 3: personal history.
This is another standard fallback for rappers with little to say. Invariably it goes like this: they grew up dirt poor, life was hard (with several examples), rap was all they cared about, everyone told them they'd never make it, they kept trying anyway, now they're rapping around the world and have money coming out of places where it shouldn't. In this category I also include lyrics about ghetto life and such, because that is just the first two parts of the life story formula. Again, this isn't unique to rap, since every band and their mum has done a song or two about the teenage years and growing up, but it seems that nowhere else is it done in the same way: formulaic, overly literal and unanalysed, done to death.
Example: December 4th, by Jay-Z.
Type 4: nothing.
This one is in no way at all unique to rap, because it's the category into which a large proportion of all lyrics fall. A collection of sentences that make sense by themselves, but together form no coherent message. I think that the biggest influence on such lyrics is euphony, and putting together two lines that rhyme is often seen as enough for a song. No matter how clever an analogy or how complex a rhyming scheme, neither can make up for a vocal track being just noise. One could argue that the voice acts as another instrument and that no-one expects a violin or drum kit to convey a message, but I just think that if you're going to speak then you should be saying something.
Example: That's That, by DOOM (who, as far as I can tell, does these songs a lot).
Type 5: everything else.
These are the lyrics that I relish: the ones that have a purpose beyond completing the beat-riff-vocal formula of a rap song, the ones that say something, anything. I think that rappers, good ones at least, must wake up some days and say to themselves, "today I think I'll make a song that says something", and that is when the magic happens. Whether it's about the Gulf War (Testify, Rage Against the Machine), waiting at the train station (Media'd Out, Urthboy), subtle racism (Mr. Nigga, Mos Def), an empty modern life (Wrong, Muph & Plutonic), skateboarding (Kick Push, Lupe Fiasco), sex (The Ass, Pharoahe Monch) or unfaithful women (Gold Digger, Kanye West), it's all good if it has something to say.
While writing rap lyrics is without doubt a very different exercise from writing other lyrics, coming up with something original to say isn't a new concept. There are rappers out there who consistently write good lyrics that have a real subject, but they are far too rare. Finding one is worth the effort, but you have to wade through a lot of boring, recycled shit to do it.