Is software developed by publicly funded research groups legally public domain? In the United States, if a university lab develops code while receiving public funding, are they legally obligated to release their source code?
No, in general they are not.

It is true that works prepared by US federal government employees as part of their official duties are in the public domain.  This applies, for instance, to journal articles by scientists at DOE or DOD laboratories.  It does not apply to public university employees (they work for state/local governments) and, as far as I know, it does not apply to computer code.