Just to clarify on the legal distinction: They can ask, and you can answer or not. What's illegal is making an employment decision based on age. Of course, the most foolproof way to prove to a belligerent labor attorney that age did not drive an employment decision is to never possess the age information in the first place. So nobody asks, and any company big enough to have an HR department internally forbids it from asking about age or any other protected factor like national origin and religion. But it's not illegal simply to ask.
Also, the Age Discrimination in Employment Act only protects workers over 40. 37 is actually fair game for discrimination.
Citation for both of the above: http://www.eeoc.gov/facts/age.html
It's probably best to avoid companies that think about hiring in the way that they'd think about selecting frat pledges, in favor of companies that think about hiring in terms of increasing their capacity to get work done. But if you really wanted to get a job at the former kind of company, my advice is (1) try to build a rapport with your interviewers somehow, so that they look up to you and think you're cool, rather than pity you for being old and wanting to be let into their treehouse, (2) contextualize yourself as having gotten really excited about programming all of a sudden, after a few decades of kicking ass in other fields, and then having made a lot of progress in programming very quickly. That's something that anyone can respect.
First off, remember that it's not legal for a US employer to ask your age. They can only ask if you're over 18. Of course, if you want to be sly about it, you'll need to craft your resume carefully (putting the year you graduated from high-school or college can tip off). Also, your looks may or may not belie your age (I have no gray hair and can look late-20s if I shave my beard).
Also, I think the biggest (perceived) issues are that either (a) employers don't want to hire older developers because their experience demands higher pay or (b) they want younger developers who can work insane hours. I must say, I don't know if these are generally true (they aren't when I hire people).
But for you, (a) shouldn't be an issue. You're a new developer so you probably are fine with a entry-level salary.