I'm going to spend all May 2014 in Germany, Czech Republic, Austria, and Hungry and I want to have a smart phone to have the possibility to see maps and thins kind of data and of course make some local calls. So my question is what's the best way to solve this, buying in Berlin a phone, buying here in my country (Mexico) an unlocked phone and buy in Berlin a SIM card or maybe rent a phone in Berlin. If someone has good advice or information I really appreciate it.
Get an unlocked phone at home - it will probably be cheaper, but more importantly easier to comparison shop and take your time to get familiar with the phone.
There are many providers of relatively cheap prepaid SIM cards in Germany, which all offer international roaming and due to EU regulations prices for this have become much more reasonable.
However, for more than minimal international data usage in a short time, ALDI Talk is the best provider I know of, since they have a package offering EU-wide data access for 5 EUR, valid for one week and recently upgraded to 120 MB:
But I'd still heed Vince's comment and get an offline map app, since intensive use of a map app can use up 120MB more quickly than you'd think.
A similar cheap prepaid SIM in Hungary could be Bluemobile in Lidl stores. You might try Tesco stores for their service or bigger service providers as Vodafone. Buying SIM cards in Hungary need registration of personal data, so a passport or ID must be at hand.