Sediment in a bottle does not always mean that the wine has gone bad. In aged red wines, pigments and tannins can precipitate over time. Transparent crystals at the bottom may sometimes be tartrate crystals, which are salts of tartaric acid. These are natural processes.
If there is a lot of sediment, it is best to stand the bottle upright in advance and then carefully decant the wine into a decanter, leaving the sediment at the bottom. You should be more concerned if the sediment is accompanied by unpleasant odors, an unusual taste, or other signs of spoilage.