What is the goal of accepting an answer? When I read a question and I see an answer accepted, how can I know if it is a good answer?
Same way you know if any answer is good:
- Read it. Does it make sense?
- Look at the votes. Do other people think it's good?
- Read the comments. Has anyone pointed out problems with it?
- Try to use the solution given. Does it work?
"Accepted" just means the person who originally asked the question liked it enough to accept it. Don't put too much stock in that...
Usually people accept the answers that solve the problem or answer the question that they asked.
If it's been accepted it likely accomplished that goal. You can also tell by the number of upvotes it may have recieved and the comments that were left, if any. People on StackOverflow tend to point out incorrect information rather quickly, and downvote any answers that they know are wrong.
If in doubt, you could always try the answer out yourself, if possible.
I could think of a few indicators that an answer is likely "good":
- Does the author have much reputation?
- Does their profile indicate much involvement in the tags associated with the question?
- Have they received up votes?
- Did they discuss their answer with others in comments?
- Is their answer well-written, and professional?
- Does their profile suggest they commonly receive several up votes on their answers?
These items aren't required for an answer to be good, but would definitely help identify good answers.
There are questions for which the OP is the best or only person who can test the value of an answer: if the question involves a large unavailable codebase, exotic hardware, ...
Voters may upvote the answers that they recognize as similar to answers that they have already seen, sometimes without checking if they apply to the question at hand. That's a trait of human nature that appears in many online forum with voting.