Commonly used in children's manga so readers can understand Kanji they would not otherwise recognise. Also used to provide pronounciation guides for names (since Kanji have multiple pronounciations and "work it out from the context" doesn't exactly work very well for names!).
Occasionally used when the writers have just made up words and would like the reader to be able to pronounce them. Manga/Clover, for example, does this a lot with its new technology (one word, the Kanji of which mean "instant teleportation device", is pronounced "modem"...).
Useless fact: The common or garden tankobon (comic volume) is called a 'ruby', because 'ruby' is old typesetting term for 5 1/2 point font, which is the size used as Furigana in that format of book.