My office is right near one of the stairways up from the Montgomery BART stattion; I don't hesistate to use it at night, and the only vagrant hassles I've ever had were really low key and ended with a "No, sorry!" from me, and that was it. I wouldn't hesitate to use it if you're headed SFO-Downtown SF.
All of BART is fine by day. The only BART station I feel really uncomfortable at night around is MacArthur, in Oakland (I admit, I haven't been to them all.) However, walking away from MacArthur, down College Ave., is fine. I just don't like the other directions. Sometimes 16th St/Mission is a little threatening, but it's really variable, depending on how much of a crowd is upstairs... I don't hesitate to go there in any case. Civic Center is empty and unpleasant at night. I used to have an office near it, so I don't feel too threatened, but some might. Market St. is well-lit, but I wouldn't walk north or south much.
Powell, Montgomery and Embarcadero are fine. (I probably wouldn't get off at West Oakland at night, either, but no hotels or touristic stuff is nearby)
Hope you have a good trip; thanks for asking, and enjoy our city!