Well the first thing is that, generally, to work in biglaw you will almost always have had to spend your 2nd summer working in biglaw. So if biglaw is your goal then working biglaw during the summer would be a good job (it's pretty much the only job if you want to work biglaw after graduation). If you work as a biglaw summer associate, pretty much any other job you
work during the school year is going to be fluff on your resume (assuming you get an offer from your summer firm).
If you don't want or can't get biglaw, then a good job is something that has a chance of turning into postgraduate employment. If you can't find something that has a chance of becoming a full time job, then ideally you'll want to be paid. This is why things like federal government internships (e.g. for federal courts, or the USAO) are often not great for people who don't already have a post-graduate job lined up because they rarely if ever pay and they almost never turn into an offer of postgraduate employment. If you can't find something that has a chance of turning into postgraduate employment and you can't find something that pays, then the next best thing is going to be something that lines up with the kind of work you want to do after graduation. With regards to your DA's office vs law firm hypo, the better of these two would be the one that has a chance of turning into a full time job. Barring that, the better of the two is the one that falls more in line with the kind of work you eventually want to do.
That said, this isn't necessarily a hard and fast rule. If you really want to work as a prosecutor, then it may make sense to take an unpaid job at the DA's office over getting paid to work at a law firm. But law students need to be realistic. While you may have an ideal postgrad job (e.g. working as a prosecutor, doing public interest, etc), the job market may force your hand. So while you may want to be a prosecutor, it may make sense to take a job at a small firm that might turn into a full time job over a dead end internship at the DA's office if your odds of getting a prosecutorial job are low. It really all comes down to the reality of the job market and what kind of chances you are willing to risk.