Hi Jackie -
No, you do not have to buy tickets in advance. The only reason for doing so would be to take advantage of any economy or super economy rates which may be available in prior to the trip. Those tickets cannot be changed without a fee (economy), changed at all (super economy) or refunded if you miss your train; your ticket is voided.
No-fee refunds/changes are possible with base fare (full fare) tickets
Here's a useful guide to Trenitalia's ticket restrictions:
http://www.trenitalia.com/cms-file/html/frecciarossa_en/Info_Tariffe_en_LeFrecce.html
If your plan is to travel directly to Rome the same day your flight arrives in Milan, it's not recommended that you purchase an economy or super-economy ticket in advance unless it is SO cheap that you're willing to eat the cost if you miss your train because of a flight or other sort of delay; entirely possible these days. You could purchase a full-fare ticket just to have it in your hand when you arrive (change if needed) but you could also just as easily buy it when you arrive. Make sense?