Find an old window that's close to the size that's best suited for your coffee table. You can find salvaged windows waiting to be recycled at your local salvage yard or antique store. Yard sales are also great resources for unwanted windows. The legs for your coffee table may also be salvaged or purchased new at your local home improvement supply store.
Sand the wooden sections of your window with a medium- or light-grade sandpaper, depending on its condition. Most windows have already been painted, so if you want to stain it for your room, you need to sand it all the way down to the wood. It would be easier to repaint the window, once you've cleaned and sanded it. Carefully remove all of the sanding debris with a damp cloth. Anything you leave on the wood will be part of the finish. You may not wish to refinish your window at all. Shabbily finished windows have more texture, perfect for a rustic coffee table.
Tape the glass with painter's tape to protect it from the paint or stain. Painter's tape come up easier, but you could also use masking tape. Make sure you do not tape any part of the wood that will be finished.
Apply the finish according to the manufacturer's directions and let it dry. Remove the tape.
Finish the coffee table legs the same as the window if they are salvaged. New legs will need priming before you paint them. Apply stain as you would on previously stained wood.
Attach the table legs to each corner of the window. New legs may have a built-in screw that fastens into the wood. In this case, pre-drill an opening on the window so that starting the attachment will be easier. You can also use a strong adhesive such as Liquid Nail to attach your legs to the window.