The primary consideration when choosing bolts is the strength required for the project. Use a bolt strength chart to determine the tensile and shear loads that a given bolt size and grade can withstand. Select nuts using the same considerations, and nuts must match the thread size of the bolts.
Other considerations for bolt type are largely cosmetic. Carriage bolts have round heads but require square holes. Stove bolts have similar head shapes and heights, but they have screwdriver slots and do not require square holes. Machine bolts have hexagonal heads and are meant to be tightened using a wrench to apply more torque.