A good starting point for handlebar width is for it to be about the same as your shoulder width, keeping your arms more or less parallel.
Stem length is a more complicated question to which there isn't one easy answer. It depends on how the rest of the bike is set up (seat fore/aft, seat to handlebar drop, etc.), which in turns depends on the frame's geometry (the lengths and angles of the tubing) and what you want from the bike (maximum power efficiency, long ride comfort, and so on).
There are a lot of formulas and "fitting systems" around; a Google search will pick up more than enough information for you to give you a good idea of what bike fitting's all about.