We usually have data concerning where the ground is, so we have to use that. The ground determines a solid figure in 3D. You project this figure radially onto the unit sphere centered at the viewer: this maps the ground onto a region in the sphere. Compute the area of the remaining region: that's the solid angle subtended by the sky (in steradians). Divide it by the total area of the sphere (equal to 4 pi) and multiply by 100 to get the sky percentage.
If you prefer a more vivid explanation, put the viewer at the center of a small spherical bubble and ask her to paint over the sky. Divide the amount of paint she uses by the amount needed to paint the entire bubble and multiply by 100.
In reality there are some not-so-simple technical details.
The projection onto the sphere is fairly straightforward when the ground is given as a triangulated network (a TIN), because you only have to write code to project a triangle onto a sphere. When the ground is given as a gridded elevation model (a DEM), you can conceive of each grid cell as a 3D quadrilateral. You might break that into two triangles along a diagonal and map each triangle onto the sphere. In either case you're left with a collection of projected triangles on the sphere. By projecting the sphere onto a map (e.g., with a stereographic projection) the aggregation of these triangles into a polygonal region can be reduced to a standard problem of plane computational geometry (using a plane sweep method, for instance). The rest is easy (for a GIS).
This image shows a small city of simulated skyscrapers in a gnomonic projection centered at a viewer downtown looking straight up. The GIS can "merge" (form the union of) the polygons representing the sides and roofs of these buildings and then compute the area of the (white) space remaining. A gnomonic projection was chosen because the straight architectural lines are rendered as line segments rather than curves.

Edit
A GIS can be placed into service to do this calculation when you have just a ground and buildings. The buildings are most likely available as collections of rectangles. A vertex of a rectangle has Euclidean coordinates (x,y,z) relative to a viewer. Convert those to spherical coordinates: that is, latitude and longitude. Create a polygon for the converted rectangle. Do this for all rectangles for all parts of all buildings, resulting in a "polygon feature layer". Then, in the GIS, (1) compute the set-theoretic union of the features, (2) calculate the resulting area, (3) subtract this from half the surface area of the earth (the other half is for the ground), and (4) divide by the whole area of the earth (multiplying by 100 to get a percentage). The computational effort is proportional to N*log(N) where N is the number of vertices. The accuracy depends on how well the GIS represents the rectangles (you might need to break rectangle sides into sequences of more closely spaced vertices). Depending on your accuracy requirements, you might consider Monte-Carlo based approaches (e.g., the ray tracing advocated in another reply) once you have more than several hundred thousand vertices--that is, once the viewer is completely surrounded by (and can see parts of) tens of thousands of buildings :-).