In a large skillet, heat the olive oil over medium heat. Add the diced onion and bell pepper, cooking until softened, about 5 minutes. Stir in the minced garlic and cook for an additional minute until fragrant.
Add the black beans, diced tomatoes (with their juices), ground cumin, chili powder, salt, and pepper. Stir to combine and let the mixture simmer for about 5-7 minutes, allowing the flavors to meld.
Using a spoon, create four small wells in the bean and tomato mixture. Crack an egg into each well. Cover the skillet and cook for about 5-8 minutes, or until the eggs are cooked to your desired doneness.
While the eggs are cooking, warm the corn tortillas in a separate pan or microwave.
Once the eggs are cooked, remove the skillet from heat. Serve the huevos rancheros on warm tortillas, topped with sliced avocado, fresh cilantro, and lime wedges.