There are no differences in terms of actual of routing. They both move packets from ingress interface A to egress interface B.
RVI must be used if you want multiple ports to be in the same VLAN and share the same layer 3 gateway (the same broadcast domain). Sub-interfaces can be used when the layer 3 configuration is significant only to that specific port. For instance, if you have 10 users on 10 separate ports and you want their IP default gateway to be 192.168.1.1, you need to configure an RVI. If you have a single device attached to a port, such as an upstream router, a point-to-point circuit, or even a VM host with a VLAN trunk, you can use sub-interfaces (or just a single logical unit) if you want.
The other difference is that VLANs have local significance on sub-interfaces, and VLANs configured in the 'vlans' hierarchy have global significance. This means you can have, for example, VLAN ID 100 configured as sub-interfaces on all 24 ports of an EX or QFX switch and they would all be separate, individual broadcast domains. VLANs configured within the 'vlans' hierarchy have global significance, which means that 'vlan vlan100' is a single broadcast domain switch-wide. You 'can' configure VLAN 100 as a global VLAN and VLAN 100 as a port VLAN, but they would be separate broadcast domains.
Make sense?