You wouldn't use mahogany for the top of a guitar, but you certainly might for the back, which is pretty much the same size and shape.
Softer woods, generally from evergreen trees, are used for tops. Spruce is a favorite, probably the very most common species