Absolutely! Black beans and pinto beans are great options for ham and bean soup. Both types of beans add a rich, earthy flavor to the soup and a creamy texture that helps thicken it up. When using black beans, you may want to add some extra spices, such as cumin and chili powder, to give the soup an extra kick of flavor. Pinto beans have a milder flavor, so you can avoid using less seasoning if desired.