In this poem, the words "dark" and "darkness" refer to the unknown. The poem is saying that there are many things that are unknown to us in life. These things tend to frighten us but we, eventually, get used to them and are able to deal with life as it comes.
You can see this idea quite clearly, for example, in the second stanza. There, Dickinson gives us the image of stepping out into the dark and needing to take a moment to get used to it. Once we have done this, we are able to see more clearly and face the road ahead.
Dickinson is not saying this will be easy. At times we will (in a great image) run headfirst into trees in the dark. We will never be completely safe in life because we really do not and cannot know for sure what is coming. However, as we go one, we get used to it and life becomes "almost straight."
So, Dickinson uses darkness here to symbolize uncertainty -- the basic uncertainty of life that can so often frighten us as we go along in our lives.
In the first two stanzas, one could say that Dickinson is talking about literal darkness, for which she uses the word "Dark." The Neighbor holds up the lamp to say goodbye and then leaves, taking the light. It takes a few moments for your eyes to adjust to the darkness. At a certain point, your eyes do adjust and you are able to move forward, although you may be apprehensive and your steps might be uncertain.
In the remaining stanzas, Dickinson shifts from the word "Dark" to "Darkness" and this is more figurative, metaphorical. This metaphorical darkness, she describes as "Those Evenings of the Brain - / When not a Moon disclose a sign." This is when we are mentally in the dark: a result of being spiritually lost, depressed, unable to find an answer or solution to a problem, uncertain, etc. Just as our eyes can eventually adjust to the "Dark," our brains can adjust to the problems of mental darkness. It takes "Bravery" and one might get hurt in braving his/her own mental darkness "And sometimes hit a tree" (here, Dickinson shifts back to walking in actual darkness, once again as a metaphor for mental darkness/depression.)
In the end, "the Darkness alters" (things get better), or we become better at dealing with things:
Something in the Sight
Adjusts itself to Midnight -