There's multiple answers to your question on how to create an API on stackoverflow. Try searching for "creating an api". Or have a look here.
As for your other questions, I think that providing an API is a nice invitation for your users to take advantage of your features/content/whatever (stuff) in ways they want. It shows that you think of them and make your stuff easily accessible.
From your point of view an API gives you more control over how people use your site, thus minimizing the risk and frustration of abuse.
Another reason for an API is if you're on a market competing with other projects or companies and they provide it. Then it'll probably be a good idea to keep up with them.
But generally, whether you should have an API or not depends entirely on the stuff you're providing. Your first consideration will have to be if there's a reason for doing one. Is it worth your effort? Will anybody use it?
Try to put yourself in your user's position.