Looking at the definitions is a good place to start. Perhaps I can get you going on the forward direction: If G is abelian, then f is a homomorphism. Perhaps if you get this part done you can take another shot at the backwards direction.
As you said, we want to prove that if G is abelian, then for all where we are using to denote the group operation. By definition of f we have I have left a blank for you to fill in. Notice that all we have used was the definition of f. This means to fill in the blank we need to use the assumption that G is abelian.
Let me know if you are able to fill in this blank. After you do give the reverse direction another shot on your own. If you're still stuck I can write again. Good luck!