The first is the same as "you are here," but expresses some surprise on the part of the speaker. "Oh, here you are! I've been looking all over for you!" ("There you are" is used the same way.)
The other common use of "here you are" is that it is said when you are handing something to someone. It is a polite phrase that means,