Can I buy an Iphone and not use the data plan?

I don't know how to phrase this right but i'll try. I want to buy an Iphone (4 or 5) for AT&T and i need an affordable plan. First off, do i NEED a data plan? And if so, if i do get it will I need to always use it? Because have an iPad and it doesn't have a data plan. I just use data when I have a Wi-Fi connection. Would the same apply if I get the iphone? Or am I only able to use Wi-Fi if i have a data plan or something? Or is the data plan just used when there's no Wi-Fi connection? Please, anyone who has experience with iphones or at&t, help me out.

Heres the deal, there are Dumbphones smartphones and superphones
dumbphones, just don't even look at em

smartphones are the ones that some companies sell for cheap, say the Xperia U which is a smartphone, you don't need a data plan for that, as its really cheap but still has great specs

the iPhone or SG3 or any superphone is over $300 that is where they charge you $50 or more a month on a 3yr contract and you HAVE TO HAVE DATA even if its only like 100mb, its still $50 a month

I have the Xperia U, just as good as all the smartphones, and the plan is only $30
there's some companies that feature cheaper plans like Virgin mobile but, for AT&T or sprint or any big US carriers, you need data

or you can just buy the phone for $600 and get a 10 dollar plan, btw All SMARTPHONES CAN USE Wi-Fi

Data= data used on your phone through your carrier ATnT
Wi-Fi= info (data) used at home, only charged through your Wi-Fi company like Rogers or what ever internet provider you have