By default the camera is allowed to roam anywhere within the defined [Scenebounds], however if you set the autobounds attribute of the level to true, things get a little more complicated.

The game has the concept of an "explored area".
Put simply this area begins surrounding just the starting area and any initial Goo Ball structure and expands as you build to reveal more and more of the level.
Note: The explored area will not contract if the player dismantles their structure.

However there is a bit more to it than that...

The explored area expands to enclose..
Any awake Goo Balls attached to a structure (including single ball + balloon)
and
Any ball tagged autoboundsunattached=true *see note
The explored area does not expand to enclose..
Sleeping Balls whether they are part of a structure or not
Walking or Thrown Goo Balls not tagged autoboundsunattached=true

The camera is allowed to move anywhere within the explored area and can show up to 800pixels either side horizontally and 600pixels above or below, although it will not go outside the defined scenebounds.

Note on Wide-Angle Cameras

If the initial zoom of the camera is "small" and the camera would show areas outside the explored area, the game automatically zooms in until only the explored area is visible. Each time the explored area expands the camera zooms out until it reaches its nominal zoom setting.

* Balls that are tagged autoboundsunattached=true
Beauty, BeautyProduct, Ugly and UglyProduct
Drained and DrainedIsh
GooProduct
Pilot
ZBomb
UndeletePill and UndeletePillFizz
WindowRect and WindowSquare