What factors are considered when a runway is planned?
First, wind rose data, unless you built the airport in the early 20th century without weather data.

By BREEZE Software (http://www.breeze-software.com/) [GFDL or CC-BY-SA-3.0], via Wikimedia Commons

It's nice to check old airports and see how they evolved over time. In the past they usually built three runways, each separated by 60 degrees in direction, to cover the compass. Over time some are lengthened, others demolished, more are added in the favorable direction, and so on. Nice example is KORD if you want to hunt the history on your own.

Example of runway closure: Why did the north / south runways close at Daugherty Field (KLGB)?

For a commercial airport expecting long haul jets, you need a long runway, to bring down civil works cost you need to find a place with a relatively flat terrain that would house said long runway.

Airport's elevation also plays a factor to runway length. The higher the airport, the longer the runways need to be. Surrounding terrain also is important. Unless you can build an island: VHHH.

For sun direction, engineers recommend Ray Bans, since the Earth spins.