I prefer books that don't end happily. Steven King's Pet Sematary, Needful Things, The Dark Half, and IT are all books I've read and loved.
However, the Song of Ice and Fire series(fantasy), by George R.R. Martin, takes the cake for tragic happenings. Important characters will die unexpectedly, randomly, and sometimes it will even seem insignificant.
I've read all four of the books and loved the countless plot twists and revelations, as well as some things that wouldn't be exactly child-friendly (vivid descriptions of sexual intercourse, brutal depictions of battles, the disturbing concept of incest).
I've also read the Inheritance series, but I honestly cannot say I've much liked it. The basic plot is unoriginal in general- powerful dragons, magic, tyrannical king, someone in the village who is a powerful ally, all that stuff.
Currently reading the Wheel of Time series(fantasy) and...well, I'm only on the first book, but it seems good.