You don't write what is wrong with this code but I think that
bc.HexFromBytes returns a full hex string with a lot of precedenting zeros. Just strip the zeros in the beginning of the string (or select the right part of the string with 4 alphanumerics/digits - that is
u = u.SubString2(u.Length-4, u.Length) - then there is no reason for the For-Next part).
Edit - Also the ", 2" why do you need it in Bit.ParseInt ? I believe the correct radix should be ", 10".
The code I believe should be (on the fly - not tested) something like this:
Sub UnicodeEscape (s As String) As String
Dim sb As StringBuilder
sb.Initialize
For i = 0 To s.Length - 1
Dim u As String
Dim bc As ByteConverter
u = bc.HexFromBytes(Array As Byte(Bit.ParseInt(Asc(s.CharAt(i)), 10)))
sb.Append("\u")
#IF B4A
For i2 = 1 To 4 - u.Length
sb.Append("0")
Next
sb.Append(u)
#ELSE IF B4i
sb.Append(u.SubString2(u.Length-4, u.Length))
#END IF
Next
return (sb.ToString)
End Sub