Question: I was recently speaking with my manager, who stated that while my work is satisfactory, they've been noticing I'm spending a lot of time of Stack Exchange. I find Stack Exchange to be very informative and helpful in my work.

Particularly considering this Stack Exchange site has many users who spend a large portion of their time on here, how can I explain to my manager how useful Stack Exchange is for me?

Answer: 
1. **Don't log in.** The value added at work for *reading* StackExchange sites *far* outweighs the value in answering questions.
2. **Only visit "hard" SEs that you need to get your job done.** Workplace.SE, bless its heart, is not one of them.

You may learn a lot from reading programmers/sofware engineering, workplace, etc. and it may help you grow in your career. But if you are having friction with your boss I would strongly recommend taking perusal of these sites to your own hours. Writing it off as career development is not an argument that is going to make you look good if your boss feels the need to bring it up to you.

**Take your job really seriously right now.** Your manager gave you some pretty serious signal that you may be being unproductive. That was nice of them. Don't wait for them to escalate this into a performance improvement plan.
You can't assume that the benefits are self-explanatory. You need to do as  

@JoeStrazzere suggested in the comments and detail the specific things you have learned that are useful for your specific job. In particular, detail what work-related problems that you found solutions for on Stack Overflow. If you can show that you spent less time solving problems by looking for them on Stack Overflow, then that would be a good thing as well.

You also need to prove that you are not be behind in your work. No manager is going to support someone spending a lot of time on the Internet at any site, if the work is behind without specific proof that the time was spent researching the specific issue(s) that was(were) making your work delayed. Further, if your coworkers are solving their problems without spending hours on Stack Overflow, then it is best to bite the bullet and spend time here only when researching a specific issue.

If you are learning new things that are not immediately useful, then I would suggest you do that in your off hours.