The difference lies in what you want to do with the result, and where.
a) If your function echoes a result it means you have to then put that call in exactly the right place.
echo "<p>Welcome ". pullUser(23) . "</p>";
b) Returning data means you can assign the result of pullUser() to a variable and act upon it later
$name = pullUser(23);
// later, or in a template, say:
echo "<p>Welcome $name</p>";
Perhaps more pertinently though, what if you want to bring more that one value from your users table? say : username and town and then want to do some analysis - you are better returning data, and making the decision about when to display it until just prior to displaying it, in general.
In design terms you are giving pullUser() too much responsibility, if you name things by what they actually do you are in fact using pullUser() to do something very explicit.
These might well seem minor things to you at the moment, but you cannot start thinking about them early enough, in my book.