That’s a good question so here are the factors you need to consider when making that decision:
the key to me is that in both cases you’ve given (r at 1 & 2, or r at 2)
there’s a runner in scoring position at 2nd
If you can, know the following before you decide what to do with your 3rd baseman
Who are you playing against? If it’s me, I’m not bunting with 1 or more outs because I’d rather give 2 hitters a chance to hit in at least 1 run and possibly 2 than simply give you a free out by bunting my runner over to 3rd and still not be sure I could hit her in. So, if you’re playing me or a coach that might think like me which is probably a former baseball coach or player since they will try to hit in runners already in scoring position (2nd base) than give up an out to move a runner further into scoring position, I would keep my 3rd baseman back. I’m much more likely to try and steal 3rd than to bunt to get it. Stealing gives me a free base without giving up and out, especially if I have runners at 1st and 2nd since a thrown out runner at 3rd still leaves me with a runner at 2nd
The other thing to know is – what is the opponents likely chance to score with
the batter at the plate? (if she’s really weak then bunting might be their best option so play for it)
the next 2 batters after the one up? (if the next 2 batters are really good then look for a bunt as this gives the opponent at least 1 chance to hit in the runs even if you walk the hitter after the player that bunts her over)
The pitcher you have throwing today? (if you’ve got a stud pitching today and the opponent’s chances of scoring are grim, look for a bunt – this IS when I’d bunt in this situation versus hitting because the chances then of my next 2 hitter’s actually getting a solid base hit would be less than the chances of giving up an ou to move a runner 60 feet closer to home.)
The amount of time left in the game? If it’s late in the game with a tie score or the offensive team is down by a little the look for a bunt (as time is running out and single runs become vital). But, if it’s early in the game and there’s time left (against a pitcher that their team can hit) then they might look to hit in a couple runs instead of playing for only 1 run. The exception to this would be if you’re pitching a kid against them that isn’t that strong of a pitcher, BUT you have a STUD you could put in if it gets close. In that case ,if I’m the other coach then I’m playing for as many runs as I can get right now since my chances slide to near zero once the stud goes in.
Remember that on defense you’re defending their most likely scenario – THEIR scenario and not yours. Knowing what they are likely to do will make defending it much easier!