DNA is simply a code maintained by the order of the nucleotides. The DNA is the sequence, but like any code, it requires something to decode it or read it. This is where messenger and transfer RNA come into play and the process of protein synthesis occurs.
DNA is ideal because it can be condensed into tiny packages, or chromosomes and fit into the nucleus of every cell. Other material would be much to large to be contained, in such detail, in each cell.
DNA works for storing info because even though there are only 4 different nitrogenous bases, they are read in groups of 3 in order to eventually code for amino acids. Using basic math, there are then 4 choices for the first in each series, 4 for the second and 4 for the third, giving 4x4x4, or 64, possibilities for codes. As there are only 20 amino acids that need to be coded for, this is plenty of combinations.
Each base pairs only with one other base (adenine with thymine, guanine with cytosine). This lets the code be duplicated accurately when DNA is replicated, and when it is transcribed to RNA (same general idea, except that thymine is replaced with uracil.)