...traveling by train in this case might be bit cheaper than flying, am i right?
Yes, train travel in that part of Europe is usually cheaper option. Also recently Hungarian national air carrier Malev got bankrupted, so it kind of effected flight connections between Hungary and Ukraine (they used to fly to Kiev and Odessa from Budapest)
What would be best rout to take? Approximately how much time it will take?
Simplest and probably cheapest way to travel from Budapest to Simferopol is via Zahony-Chop-Lviv. Thus you need to catch Budapest-Zahony train, then change there for Zahony-Chop one, while from Chop you can already get direct train to Crimea. In Ukraine they will change timetable last weekend on May, so it's not yet know exactly the schedule for the summer, but almost definitely there will be direct train Uzghorod-Chop-Simferopol, just need to wait until schedules are released. If to say roughly, then Budapest-Zahony-Chop leg is around 5:30-7 hours (depending on connection), while Chop-Simferopol should be around 30 hours, unfortunately distance is rather big and train in Ukraine aren't that fast. But if you do have time, then we would suggest to travel with stopovers on the way, thus allowing you to make shorter journeys and to see some interesting places on the way (like Uzghorod, Lviv, Kiev etc.). Regarding fare: Budapest-Chop international ticket cost 17 euro, while direct domestic ticket Chop-Simferopol should be around 150 UAH 'platskarnyi' or 200+ UAH 'kupe', so it won't be a problem to travel for <40-45 euro from Budapest all the way to Simferopol.
Alternative option will be avoid long rail journeys withing Ukraine, but instead fly from Budapest to Bucharest (for instance WizzAir has some really cheap tickets for this route), then make you way north-east to Moldova and eventually Odessa, while from there you can catch a train to Simferopol. Again, roughly (if traveling without stops) you might manage in around 24 hours.
Students in Hungary have 50% discount, is it for hungarian students only or does it work also for foreign students?
50% discount in given on domestic journeys for holders of Hungarian Student Card no matter whether you citizen of Hungary or not. If you don't have it, then might work age discount for youth (<26 years old) - 33% on Fridays-Sundays.
p.s. Hungarian Railways (MAV) website (schedules and domestic fares) -
http://elvira.mav-start.hu and Ukrainian (UZ) -
http://uz.gov.ua/en (but remember that it won't show you summer timetable at the moment due to schedule change in late May)