They are both said to be fairly literal word for word translations, with the NASB having the slight advantage. Both are said to be very accurate. No translation is perfect because translation involves some subjectivity, but both of these are good. The 1970's NASB was said to have more "wooden" language, but that is not true of the updated (1995) NASB. In fact, I think some parts of the updated NASB flow better than in the ESV, but that's my opinion.
Among some other things I like better about the NASB:
The NASB does a better job of footnoting variances among the manuscript text bases.
The NASB italicizes words that had to be added to make sense in English; the ESV does not, so you can't tell those words are additions.
The NASB capitalizes pronouns that refer to the Deity; the ESV does not.
Verses that are included in some of the manuscript bases but not in others (such as part of the Lord's prayer) are included in the main text, inside brackets, in the NASB. In the ESV, they are only shown as a footnote.
I personally like the NASB better, but I don't think you'd go wrong with either of these. They are very similar.
In fact, none of the mainstream translations (excluding those adulterated to fit cult theology, of course) differ in basic Christian doctrine. The KJV, NJKV, HCSB, and NIV (especially the 1984 NIV) are also good translations, so take your pick. The NIV is a thought for thought rather than more literal translation, however.