If you're lucky enough to have a terrace or deck on your roof, put the space to use with a garden. Soil and water are heavy. Make sure your roof will structurally withstand the extra added weight. Most home gardeners will prefer the ease of using containers rather than permanently building planters on the rooftop. Permanent installation may require building permits and inspections as well.
Check railings and the roofing surface for stability. Most decks and terraces must have safety railings. If your roof doesn't, you will have to install them before using the roof's surface for gardening.
Install a hose or watering system. Run a hose up the side of the house to water the plants. Even with natural rainfall, a rooftop garden will most likely need supplemental water. It's not feasible to drag a watering can from the upstairs bathroom to water several dozen plants. If you have an irrigation system, it may be possible to run extra tubing to the roof so the plants are watered automatically.
Check the drainage on the roof to make sure it can adequately handle the extra runoff from watering. Most flat topped roofs and decks are actually slightly angled so the water drains and doesn't pool. Don't impede the drainage or block drainage outlets with pots.
Select light weight plastic or resin pots rather than ceramic or terracotta. Spray paint the pots for a consistent look. Lighter colors won't heat up the soil. Cluster the pots together to cut down on maintenance, make watering and fertilizing easier and to give a lush look to the garden. Clustering also increases the humidity around the plants.
Lift the pots off the roof using saucers with pot feet under the saucers. Water caught under the pot leads to roof damage, mildew and mold.
Choose vegetables that you like. There's no point in growing eggplant if no one will eat it. A number of vegetables have been bred for container growing. Choose bushier plants that stay smaller but still have a good production rate. Patio Pick is a good choice for tomatoes, for example.
Grow vertically to take advantage of limited space. Grow cucumbers, beans, squash, melons and peas up supports rather than letting them sprawl.
Use the plants to provide privacy from neighbors and to block unwanted views.