When does a deck need a railing?
When it is more than 30 inches above grade: the International Residential Code, as laid out in the American Wood Council's DCA 6 deck guide, requires a guard on those decks. Lower decks may not need one, but any railing that is there should still be solid.