The first number refers to the actual weight of the oil. Now think of butter when it gets hot, it thins out to a lower weight. To counter-act this, scientists added "glue" to the mix that thickens the oil when hot. The second number represents the weight of the cold oil that its chemically represents. In other words a 5W30 oil hot is thinning out like a 30W oil would when hot.
As for what weight is best... Too thin it burns up, too thick it bogs the engine down. What the manufacturer recommends is whats best, they know the engine best. Here's a link to the TSB regarding recommended oil for Toyota vehicles
http://www.alldata.com/tsb/Toyota/11...-06/index.html
The 2006 Prius has the NZ series engine I believe. Check your manual to be sure.