When is it a good idea to pick the Craftsman in Puerto Rico?
I do not agree with the other answers that say Craftsman should be rarely taken.  By carefully consider seat order implications, if a player can answer the below questions in the affirmative then Craftsman should be the choice if no better options present themselves.  First a review of what Craftsman does.
Why take Craftsman?

Craftsman generate barrels which turn into victory points.  As this is the obvious way to generate victory points many players deemphasize this after playing a few games, leaving this route to the newbies. I feel this is a mistake and leaves an opportunity that can be exploited.
You get an extra barrel.  Note that this barrel comes last so you cannot use this to deny others.  However early game, an extra Corn will get you a quick extra VP.  Mid game an extra Coffee or Tobacco may allow you to trade multiple times off of one Craftsman for extra $$.

When to take Craftsman
There are two primary things to consider in the general case when deciding whether to take Craftsman.
Has Captain been taken in this round yet?
This is the big issue with Craftsman.  It is much better to take it in a round when Captain has already been chosen.  This limits the number of opportunities other folks will have to take Captain and deny you any benefit of your extra barrels.
Will you benefit the next time Captain is taken?
You need to put some thought into your seat order.  For example, in a 5 player game, you are seated second.  Player 1 goes first and takes Captain.  You can now craft freely knowing that you will have the first shot at taking Captain next round.  If you are seated third and take Craftsman you will get the second shot at Captain.  If player 2 takes Captain you are probably still going to get preferential loading of your barrels onto the ships.
As you get farther away from the current starting player, Craftsman becomes less attractive.
If you badly need money, you can consider the same two steps but in regard to Trader instead of Captain.  Sometimes you really need the money that trading a Coffee or Tobacco will give you.  A well chosen Trader can net you $5+ while potentially denying everyone else any benefit (if 3 spots are already filled for example).  While doing this you also need to give some though to the Captain.  You don't want to be forced to load your potential $7 barrel of Coffee on a ship right before you would get to pick Trader!
Other reasons to take Craftsman?

You are producing corn early in the game.  Get an extra barrel, it will likely turn into an extra VP
To make sure you produce the maximum possible.  If there are only 3 Tobacco left in stock, then Craft to make sure you get them.
Because you have a wharf.  With a wharf you don't have to worry about being denied the opportunity to ship your goods.
Because you have a warehouse.  A warehouse will enable you to store your goods through the next Captain phase (assuming it will be chosen at a bad time for you).  Then you can ship them later on.
To deny other people!  If it is obvious that that a later player will benefit greatly from Craftsman, taking it early can deny them a lot of barrels.
To force someone to take Captain.  This is related to the previous one.  If you are going first in a round, and you know that a later player (4th or 5th) will definitely take Captain, you can often convince player 2 or 3 to Captain if you take Craftsman in front of them.
There is money on it.  An extra $ or two can make all the difference!
You are winning and not able to end the game.  Crafting is the engine that drives the game along.  If you are confident that you have a good lead then Crafting can occasionally help things along even if you don't directly benefit from the Crafting yourself.