While I haven't used it personally, I've heard of people shipping Node.js as part of iOS apps (and, for that matter, as part of Firefox extensions), but even without Node.js, most of these devices will have some JS runtime, in or outside of a browser/webview.
As for Python, I would be less hopeful about the presence of Python on smart phones and tablets, although I suppose anything is possible.
Usually you are cross-compiling to target mobile platforms, so you don't generally need to worry about a given toolchain being present on the device itself.