You must have romanced her in Mass Effect 2 in order to romance her again/continue relationship with her.
Just don't break up with her when inviting her to your cabin and than the relationship is pretty much locked-in.
^ Unfortunately, Tali's lock-in is time-sensitive, you have to invite her up before Priority: Rannoch or you don't get another chance to lock her in, and the romance is cancelled. If you want to create divergent files, you'll need one right before that Priority mission, and Ashley/Liara can be locked in anytime before the final missions/the point of no return, as long as you get their e-mails and don't talk to them on the Presidium. Jack can be gotten any time as well, Miranda must be locked in before Sanctuary, during your third meeting with her, but these two are mutually-exclusive with Tali because only one can be carried over from ME2. RShepard227