It's because "$i" is initially undefined. Quoting it gets around this.
#!/usr/bin/ksh
cd $receive_dir
until [ "$i" = stopfile ]
do
for i in *; do
time=$(date +%m-%d-%Y-%H:%M:%S)
echo "$time"
echo "$i"
done
done
for i in `ls receive_dir`; do will produce an error if no files exist, and for i in *; do resolves to * if no files exist, and it seems a bit wasteful to scan a whole directory to look for a known file, so it's probably better just to check if the file exists.