In nonstick skillet over medium heat, warm olive oil.
Add onions and cook until soft, stirring occasionally, 7–10 minutes. Add garlic and continue stirring 1 minute. Add green beans and tomatoes; cover and cook over low heat until green beans are soft, 25 minutes.
Season with salt and pepper. Cook, uncovered, until liquid is almost gone, 2–3 minutes.