Linking an armature to a scene
Blender has the concept of:


Scene: Reference Objects
Objects: Reference Object Data (Mesh, Armature, Lamp. etc)


This is needed so you can (for example) have many instances of the same mesh, which saves memory and allows you to edit without having to manually update copies.

Here is the script modified to work as expected.

import bpy

arm = bpy.data.armatures.new("My Rig")

# create an object
obj = bpy.data.objects.new("My Object", arm)

bpy.context.scene.objects.link(obj)