At what angle do solar panels have to be positioned to get the most efficiency?

I want to build a house and put solar panels on my roof. What angle do I need to build my roof at so I can just place solar panels flat on my roof? Which direction does the solar panels need to be facing?