I think you will not be able to draw a single shadow quad, but rather a quad for each edge (wall) of the building. If your buildings are represented by rectangles, and let's say the light is coming from the top left, then you need to draw a shadow quad each for the right and bottom edges (i.e. the ones facing away from the light). You simply take each edge, translate it away from the light by an amount proportional to the height, connect the vertices of the original edge to the vertices of the translated one, and you're done.
An attempt at ASCII-art to show what I mean:
\ light direction
| |a |
\ \2 |
\ shadow1\ |
As you see, you don't even need any trig, just a bit of algebra.