Federation of State Medical Boards has the minimum requirements. When you should do it and whether it makes sense as a resident (or might even be required as a resident) is something that is state and program specific.
This is program-dependent. I took Step 3 in PGY2, but I didn't get my full license until the last year of residency. I even did in-house moonlighting on a training permit. A full license is necessary when applying to take specialty boards.
It's quite possible that you could complete your entire residency without getting a full license. It's state and program specific, and depends on whether you want to moonlight (and as mentioned, some internal moonlighting might not need a full license)
This is program-dependent. I took Step 3 in PGY2, but I didn't get my full license until the last year of residency. I even did in-house moonlighting on a training permit. A full license is necessary when applying to take specialty boards.
Surprisingly, it's not a requirement for Family Medicine. FM offers the option of taking your specialty boards in April of your PGY-3 year; you only become "fully board certified for realsies" when you get your unrestricted license. But yes, you get to take the test before getting a license.
(I have no idea why they made this the case for FM; I just took advantage of it.)
Keep in mind that many jobs will often pay for your state medical license, but if you do this as a resident for your own purposes (moonlighting, etc.) then you have to pay it yourself out of pocket (although it may be at a discounted price).