It's bad news for a system service (such as the Puppet agent) to rely on environment variables that it does not manage itself. In particular, it generally does not work to rely on such environment variables to be set via standard shell setup files. Configuring yum with the proper proxy settings is a good way to go, and obviously you could (and probably should) use Puppet to configure yum.
I can only speculate as to why that seems unneeded on some of your systems. Possibly the proxy configuration is set on the agent (http_proxy_* configuration parameters or command-line options) and that is being exported to subprocesses. Or possibly the hosts that work without proxy configuration are able to connect directly. Or possibly their traffic is running through a NAT server or a similar network device that serves as a transparent proxy.
Consider, too, managing internal mirrors of the repositories you rely upon, and pointing yum there. If the proxy is needed only for access outside your own network, then that could smooth things out. It has multiple other advantages, too, among them reducing the load on your network uplink and giving you control over which packages are available for installation / upgrade.
John